diff options
author | Tim Schumacher <timschumi@gmx.de> | 2022-06-29 05:00:28 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-06-30 11:57:49 +0200 |
commit | 9497cc6c97afaad1749e8eccdf218d0c903349c5 (patch) | |
tree | 99e544e4cd3825fb08b2fa4513d5f9fb0787ba6a | |
parent | e2036ca2caae571ee63a613742cdb9c68d79d6d9 (diff) | |
download | serenity-9497cc6c97afaad1749e8eccdf218d0c903349c5.zip |
LibC: Stub out `brk` and `sbrk`
-rw-r--r-- | Userland/Libraries/LibC/unistd.cpp | 14 | ||||
-rw-r--r-- | Userland/Libraries/LibC/unistd.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/unistd.cpp b/Userland/Libraries/LibC/unistd.cpp index 77420a3e61..b305185249 100644 --- a/Userland/Libraries/LibC/unistd.cpp +++ b/Userland/Libraries/LibC/unistd.cpp @@ -1002,4 +1002,18 @@ int nice(int incr) dbgln("FIXME: nice was called with: {}, not implemented", incr); return incr; } + +int brk(void* addr) +{ + dbgln("TODO: brk({:#x})", addr); + errno = ENOMEM; + return -1; +} + +void* sbrk(intptr_t incr) +{ + dbgln("TODO: sbrk({:#x})", incr); + errno = ENOMEM; + return reinterpret_cast<void*>(-1); +} } diff --git a/Userland/Libraries/LibC/unistd.h b/Userland/Libraries/LibC/unistd.h index 6707a5bbab..cf3c2896fd 100644 --- a/Userland/Libraries/LibC/unistd.h +++ b/Userland/Libraries/LibC/unistd.h @@ -121,6 +121,8 @@ int pause(void); int chroot(char const*); int getdtablesize(void); int nice(int incr); +int brk(void* addr); +void* sbrk(intptr_t incr); enum { _PC_NAME_MAX, |