From: Rich Felker Date: Thu, 2 Jan 2014 22:13:19 +0000 (-0500) Subject: disable the brk function X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=863d628d93ea341b6a32661a1654320ce69f6a07;p=musl disable the brk function the reasons are the same as for sbrk. unlike sbrk, there is no safe usage because brk does not return any useful information, so it should just fail unconditionally. --- diff --git a/src/linux/brk.c b/src/linux/brk.c index d91ee5a9..ffdbbd52 100644 --- a/src/linux/brk.c +++ b/src/linux/brk.c @@ -1,6 +1,7 @@ +#include #include "syscall.h" int brk(void *end) { - return -(syscall(SYS_brk, end) != (unsigned long)end); + return __syscall_ret(-ENOMEM); }