mailing list of musl libc
 help / color / mirror / code / Atom feed
5fab74be29c83d729c5718d13f5106a1cd9be41d blob 204 bytes (raw)

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

void *sbrk(ptrdiff_t inc)
{
	unsigned long cur = syscall(SYS_brk, 0);
	if (inc && syscall(SYS_brk, cur+inc) != cur+inc) return (void *)-1;
	return (void *)cur;
}
debug log:

solving 5fab74b ...
found 5fab74b in https://git.vuxu.org/mirror/musl/

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).