Attached is a blind attempt at working around the issue based on what you
show below, that I cannot test.
> typedef struct fd_set {
> u_int fd_count; /* how many are SET? */
> SOCKET fd_array[FD_SETSIZE]; /* an array of SOCKETs */
> } fd_set;
>
> #define FD_SET(fd, set) do { \
> u_int __i; \
> for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count; __i++) { \
> if (((fd_set FAR *)(set))->fd_array[__i] == (fd)) { \
> break; \
> } \
> } \
> if (__i == ((fd_set FAR *)(set))->fd_count) { \
> if (((fd_set FAR *)(set))->fd_count < FD_SETSIZE) { \
> ((fd_set FAR *)(set))->fd_array[__i] = (fd); \
> ((fd_set FAR *)(set))->fd_count++; \
> } \
> } \
> } while(0, 0)
--
Fabien.