libc: getdtablesize support

Issue #1847
This commit is contained in:
Emery Hemingway 2016-01-08 14:51:07 +01:00 committed by Christian Helmuth
parent 2d50552522
commit 976833f171
2 changed files with 8 additions and 1 deletions

View File

@ -61,7 +61,6 @@ DUMMY(long , -1, fpathconf, (int, int))
DUMMY(int , -1, freebsd7___semctl, (void))
DUMMY(int , -1, fstatat, (int, const char *, struct stat *, int))
DUMMY(int , -1, getcontext, (ucontext_t *))
DUMMY(int , 0, getdtablesize, (void))
DUMMY(gid_t , 0, getegid, (void))
DUMMY(uid_t , 0, geteuid, (void))
DUMMY(int , -1, getfsstat, (struct statfs *, long, int))

View File

@ -81,3 +81,11 @@ File_descriptor *File_descriptor_allocator::find_by_libc_fd(int libc_fd)
{
return metadata(reinterpret_cast<void*>(libc_fd));
}
/********************
** Libc functions **
********************/
extern "C" int __attribute__((weak)) getdtablesize(void) {
PDBG("libc"); return MAX_NUM_FDS; }