diff --git a/userspace/libraries/LibC/include/unistd.h b/userspace/libraries/LibC/include/unistd.h index fed6cadd..ad854514 100644 --- a/userspace/libraries/LibC/include/unistd.h +++ b/userspace/libraries/LibC/include/unistd.h @@ -233,6 +233,8 @@ int unlinkat(int fd, const char* path, int flag); int usleep(useconds_t usec); ssize_t write(int fildes, const void* buf, size_t nbyte); +int getpagesize(void); + extern char* optarg; extern int opterr, optind, optopt; diff --git a/userspace/libraries/LibC/unistd.cpp b/userspace/libraries/LibC/unistd.cpp index 48c04bad..da59d044 100644 --- a/userspace/libraries/LibC/unistd.cpp +++ b/userspace/libraries/LibC/unistd.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include @@ -448,6 +449,11 @@ int getopt(int argc, char* const argv[], const char* optstring) return '?'; } +int getpagesize(void) +{ + return PAGE_SIZE; +} + pid_t getpid(void) { return syscall(SYS_GET_PID);