shithub: scc

ref: c22a72acf6627d779b527dfd43e6abc7148f2886
dir: /src/libc/arch/linux/_brk.c/

View raw version
#include <errno.h>
#include <stddef.h>

#include "../../libc.h"
#include "../../syscall.h"
#include "brk.h"

int
_brk(void *addr)
{
	if (_sys_brk(addr) != addr) {
		errno = ENOMEM;
		return -1;
	}
	return 0;
}