Fix old glibc without liblinuxcompat.a
This commit is contained in:
22
project/src/system/System.cpp
Normal file
22
project/src/system/System.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifdef HX_LINUX
|
||||
|
||||
// Improve compatibility with old glibc
|
||||
|
||||
#define __fdelt_chk __fdelt_chk_local
|
||||
#include <sys/select.h>
|
||||
#undef __fdelt_chk
|
||||
|
||||
long int __fdelt_chk (long int d) {
|
||||
|
||||
if (d >= FD_SETSIZE) {
|
||||
|
||||
//printf("Select - bad fd.\n");
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
return d / __NFDBITS;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user