Rich Felker | fd142e5 | 2011-09-26 00:59:28 -0400 | [diff] [blame] | 1 | #include <stdint.h> |
Rich Felker | 7a995fe | 2014-01-02 17:03:34 -0500 | [diff] [blame] | 2 | #include <errno.h> |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 3 | #include "syscall.h" |
4 | |||||
Rich Felker | fd142e5 | 2011-09-26 00:59:28 -0400 | [diff] [blame] | 5 | void *sbrk(intptr_t inc) |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 6 | { |
Rich Felker | 7a995fe | 2014-01-02 17:03:34 -0500 | [diff] [blame] | 7 | if (inc) return (void *)__syscall_ret(-ENOMEM); |
8 | return (void *)__syscall(SYS_brk, 0); | ||||
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 9 | } |