summaryrefslogtreecommitdiff
path: root/src/linux
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-01-02 17:13:19 -0500
committerRich Felker <dalias@aerifal.cx>2014-01-02 17:13:19 -0500
commit863d628d93ea341b6a32661a1654320ce69f6a07 (patch)
tree6002adc25ab93548659d92d3b784083ae3c07a44 /src/linux
parent7a995fe706e519a4f55399776ef0df9596101f93 (diff)
downloadmusl-863d628d93ea341b6a32661a1654320ce69f6a07.tar.gz
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.
Diffstat (limited to 'src/linux')
-rw-r--r--src/linux/brk.c3
1 files changed, 2 insertions, 1 deletions
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 <errno.h>
#include "syscall.h"
int brk(void *end)
{
- return -(syscall(SYS_brk, end) != (unsigned long)end);
+ return __syscall_ret(-ENOMEM);
}