[freetds] Missing header in src/pool/pool.h

Nick Stoughton nick at msbit.com
Tue Apr 13 14:57:02 EDT 2004

The POSIX standard defines that the fd_set type be defined by including
either sys/select.h or sys/time.h. However, pool.h includes neither of
these directly, and uses fd_set. On Linux, sys/types.h (which IS
included in pool.h) includes sys/select.h.

I discovered this problem while porting to Microsoft's Services for
Unix, where the type is defined in sys/time.h (and sys/select.h simply
includes sys/time.h). The attached patch solves the compilation error
that results from fd_set not being defined.

*** src/pool/pool.h.orig        Mon Dec 22 00:32:14 2003
--- src/pool/pool.h     Mon Apr 12 18:09:58 2004
*** 31,36 ****
--- 31,40 ----
  #include <netinet/in.h>
  #endif /* HAVE_NETINET_IN_H */
+ #include <sys/time.h>
+ #endif /* HAVE_SYS_TIME_H */
  #include "tds.h"
  /* defines */

Nick Stoughton <nick at msbit.com>
MSB Associates

More information about the FreeTDS mailing list