about summary refs log tree commit diff
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
parent7a995fe706e519a4f55399776ef0df9596101f93 (diff)
downloadmusl-863d628d93ea341b6a32661a1654320ce69f6a07.tar.gz
musl-863d628d93ea341b6a32661a1654320ce69f6a07.tar.xz
musl-863d628d93ea341b6a32661a1654320ce69f6a07.zip
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.
-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);
 }