projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a995fe
)
disable the brk function
author
Rich Felker
<dalias@aerifal.cx>
Thu, 2 Jan 2014 22:13:19 +0000
(17:13 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 2 Jan 2014 22:13:19 +0000
(17:13 -0500)
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.
src/linux/brk.c
patch
|
blob
|
history
diff --git
a/src/linux/brk.c
b/src/linux/brk.c
index
d91ee5a
..
ffdbbd5
100644
(file)
--- 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
);
}