diff --git a/libs/libc/include/unistd.h b/libs/libc/include/unistd.h index b9f98ef7..b903f850 100644 --- a/libs/libc/include/unistd.h +++ b/libs/libc/include/unistd.h @@ -103,6 +103,9 @@ extern "C" int chdir(const char* path); // Not implemented. int pipe(int fd[2]); // Not implemented. + /* Returns the maximum number of file descriptors a process can have open at the same time. */ + int getdtablesize(void); + #ifdef __cplusplus } #endif diff --git a/libs/libc/src/unistd.cpp b/libs/libc/src/unistd.cpp index 2fdb32cf..bd042c6a 100644 --- a/libs/libc/src/unistd.cpp +++ b/libs/libc/src/unistd.cpp @@ -163,4 +163,9 @@ extern "C" { NOT_IMPLEMENTED("pipe"); } + + int getdtablesize(void) + { + return OPEN_MAX; + } } \ No newline at end of file