add NFDBITS in sys/select.h with appropriate feature tests
[musl] / include / sys / select.h
index c5a2877..e25257d 100644 (file)
@@ -32,6 +32,9 @@ typedef struct
 int select (int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, struct timeval *__restrict);
 int pselect (int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, const struct timespec *__restrict, const sigset_t *__restrict);
 
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define NFDBITS (8*(int)sizeof(long))
+#endif
 
 #ifdef __cplusplus
 }