From: sos AT prospect DOT com DOT ru (Sergey Okhapkin) Subject: RE: Problem with select() 20 Sep 1998 10:51:03 -0700 Message-ID: <01BDE4DF.5CA30770.cygnus.cygwin32.developers@sos> To: "'cygwin32-developers AT cygnus DOT com'" , "'Christopher Faylor'" Sergey Okhapkin wrote: > > -#define WINSOCK_FD_ZERO(set) ((set)->fd_count=0) > > +#define WINSOCK_FD_ZERO(set) memset ((set), 0, sizeof (*(set))) > > Hmmm... That works for me too! What is default structure members alignment for I've found the bug... --- /winsup/select.h Fri Sep 11 05:21:45 1998 +++ select.h Sun Sep 20 20:37:17 1998 @@ -16,7 +16,7 @@ */ typedef struct winsock_fd_set { - unsigned short fd_count; + unsigned int fd_count; HANDLE fd_array[1024]; /* Dynamically allocated. */ } winsock_fd_set; -- Sergey Okhapkin, http://www.lexa.ru/sos Moscow, Russia