diff --git a/libmaxsi/include/unistd.h b/libmaxsi/include/unistd.h index b879023c..e571deeb 100644 --- a/libmaxsi/include/unistd.h +++ b/libmaxsi/include/unistd.h @@ -184,6 +184,7 @@ ssize_t write(int, const void*, size_t); #if defined(_SORTIX_SOURCE) int execvpe(const char*, char* const [], char* const []); +int getdtablesize(void); size_t getpagesize(void); int memstat(size_t* memused, size_t* memtotal); size_t preadall(int fd, void* buf, size_t count, off_t off); diff --git a/libmaxsi/io.cpp b/libmaxsi/io.cpp index 5849a64e..9bb02b04 100644 --- a/libmaxsi/io.cpp +++ b/libmaxsi/io.cpp @@ -359,6 +359,14 @@ retry: } return templ; } + + // TODO: This has been replaced with sysconf(_SC_OPEN_MAX). This is only + // here for compatibility with gzip and should be removed as soon as sysconf + // is implemented. + extern "C" int getdtablesize(void) + { + return 0x10000; + } #endif }