libc: Add getdtablesize()

No system call for this, since the limit is fixed right now
This commit is contained in:
apio 2022-11-12 14:15:02 +01:00
parent f46831f459
commit 9e8a57cec7
2 changed files with 8 additions and 0 deletions

View File

@ -103,6 +103,9 @@ extern "C"
int chdir(const char* path); // Not implemented. int chdir(const char* path); // Not implemented.
int pipe(int fd[2]); // 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 #ifdef __cplusplus
} }
#endif #endif

View File

@ -163,4 +163,9 @@ extern "C"
{ {
NOT_IMPLEMENTED("pipe"); NOT_IMPLEMENTED("pipe");
} }
int getdtablesize(void)
{
return OPEN_MAX;
}
} }