volser: select() cannot be used to sleep on windows
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 16 Jan 2011 21:42:15 +0000 (16:42 -0500)
committerJeffrey Altman <jaltman@openafs.org>
Tue, 18 Jan 2011 17:55:35 +0000 (09:55 -0800)
On Windows must use Sleep() instead of select() with no
fd_set parameters.

Change-Id: I693718c74dd9be0b4eb58ec26afac0882845e71c
Reviewed-on: http://gerrit.openafs.org/3675
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>

src/volser/volmain.c

index 993a58d..00eea8e 100644 (file)
@@ -150,7 +150,11 @@ BKGLoop(void *unused)
        tv.tv_sec = GCWAKEUP;
        tv.tv_usec = 0;
 #ifdef AFS_PTHREAD_ENV
+#ifdef AFS_NT40_ENV
+        Sleep(GCWAKEUP * 1000);
+#else
         select(0, 0, 0, 0, &tv);
+#endif
 #else
        (void)IOMGR_Select(0, 0, 0, 0, &tv);
 #endif