mailing list of musl libc
 help / color / mirror / code / Atom feed
478a35ebf82ba1907187d37dd724389181c4924e blob 219 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 
#include <stddef.h>
#include "syscall.h"

void *sbrk(ptrdiff_t inc)
{
	void *p = (void *)syscall(SYS_brk, 0);

	if (inc == 0)
		return p;
	if ((void *)syscall(SYS_brk, p+inc) == p+inc)
		return p;
	return (void *)-1;
}
debug log:

solving 478a35e ...
found 478a35e in https://inbox.vuxu.org/musl/20110522145555.GE6142@port70.net/
found b2943a9 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 b2943a9239533967b1f8468dc607804b31335b0d	src/linux/sbrk.c

applying [1/1] https://inbox.vuxu.org/musl/20110522145555.GE6142@port70.net/
diff --git a/src/linux/sbrk.c b/src/linux/sbrk.c
index b2943a9..478a35e 100644

Checking patch src/linux/sbrk.c...
Applied patch src/linux/sbrk.c cleanly.

index at:
100644 478a35ebf82ba1907187d37dd724389181c4924e	src/linux/sbrk.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).