Explorar o código

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.
Rich Felker %!s(int64=11) %!d(string=hai) anos
pai
achega
863d628d93
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/linux/brk.c

+ 2 - 1
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);
 }