* 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

@ -119,7 +119,9 @@ HISTORY
2007-04-17 Jonathan Larmour
* pbuf.c: Use s32_t in pbuf_realloc(), as an s16_t can't reliably hold
the difference between two u16_t's.
the difference between two u16_t's.
* sockets.h: FD_SETSIZE needs to match number of sockets, which is
MEMP_NUM_NETCONN in sockets.c right now.
2007-04-12 Jonathan Larmour
* icmp.c: Reset IP header TTL in ICMP ECHO responses (bug #19580).

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)))