* sockets.h: FD_SETSIZE needs to match number of sockets, which is

MEMP_NUM_NETCONN in sockets.c right now.
This commit is contained in:
jifl
2007-04-17 14:50:08 +00:00
parent cd19d81411
commit eacac8ee1d
2 changed files with 5 additions and 2 deletions

View File

@@ -213,7 +213,8 @@ typedef struct ip_mreq {
#ifndef FD_SET
#undef FD_SETSIZE
#define FD_SETSIZE 16
/* Make FD_SETSIZE match NUM_SOCKETS in socket.c */
#define FD_SETSIZE MEMP_NUM_NETCONN
#define FD_SET(n, p) ((p)->fd_bits[(n)/8] |= (1 << ((n) & 7)))
#define FD_CLR(n, p) ((p)->fd_bits[(n)/8] &= ~(1 << ((n) & 7)))
#define FD_ISSET(n,p) ((p)->fd_bits[(n)/8] & (1 << ((n) & 7)))