ref: 9c7e1db701e0e80b42bb5990e2f6839d712bb984
parent: eddc8dea860e8ddc77761d2b61b58ff843009698
author: cinap_lenrek <[email protected]>
date: Sun Mar 31 14:46:14 EDT 2013
ape: define FD_SETSIZE for select()
--- a/sys/include/ape/sys/select.h
+++ b/sys/include/ape/sys/select.h
@@ -19,6 +19,11 @@
#define FD_CLR(n,p) ((p)->fds_bits[(n)>>5] &= ~(1 << ((n) &0x1f)))
#define FD_ISSET(n,p) ((p)->fds_bits[(n)>>5] & (1 << ((n) &0x1f)))
#define FD_ZERO(p) ((p)->fds_bits[0] =0, (p)->fds_bits[1] =0, (p)->fds_bits[2] =0)
+
+#ifndef FD_SETSIZE
+#define FD_SETSIZE 96
+#endif
+
#endif
#ifdef __cplusplus
--- a/sys/include/ape/sys/types.h
+++ b/sys/include/ape/sys/types.h
@@ -40,6 +40,9 @@
#define FD_CLR(n,p) ((p)->fds_bits[(n)>>5] &= ~(1 << ((n) &0x1f)))
#define FD_ISSET(n,p) ((p)->fds_bits[(n)>>5] & (1 << ((n) &0x1f)))
#define FD_ZERO(p) ((p)->fds_bits[0] =0, (p)->fds_bits[1] =0, (p)->fds_bits[2] =0)
+#ifndef FD_SETSIZE
+#define FD_SETSIZE 96
+#endif
#endif
#endif