sys_time: Override 'struct timeval' on some native Windows platforms.
[gnulib.git] / lib / select.c
index 7813f2f..5356c46 100644 (file)
 #include <conio.h>
 #include <time.h>
 
+/* Get the overridden 'struct timeval'.  */
+#include <sys/time.h>
+
 #include "msvc-nothrow.h"
 
+#undef select
+
 struct bitset {
   unsigned char in[FD_SETSIZE / CHAR_BIT];
   unsigned char out[FD_SETSIZE / CHAR_BIT];
@@ -237,6 +242,7 @@ windows_poll_handle (HANDLE h, int fd,
 int
 rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
             struct timeval *timeout)
+#undef timeval
 {
   static struct timeval tv0;
   static HANDLE hEvent;