]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Fix compiler warning/error: ISO C90 forbids mixed declarations and code
authorYang Tse <yangsita@gmail.com>
Sun, 18 Mar 2007 17:29:24 +0000 (17:29 +0000)
committerYang Tse <yangsita@gmail.com>
Sun, 18 Mar 2007 17:29:24 +0000 (17:29 +0000)
lib/select.c

index 90a6986ca78f2b54555082286410881bca415d5f..32261f2c0e5deae2a9fd1440995e5ca96877b94f 100644 (file)
  */
 static void wait_ms(int timeout_ms)
 {
+#if !defined(__MSDOS__)   && \
+    !defined(USE_WINSOCK) && \
+    !defined(HAVE_POLL_FINE)
+  struct timeval timeout;
+#endif
   if (timeout_ms <= 0)
     return;
 #if defined(__MSDOS__)
@@ -85,7 +90,6 @@ static void wait_ms(int timeout_ms)
 #elif defined(HAVE_POLL_FINE)
   poll(NULL, 0, timeout_ms);
 #else
-  struct timeval timeout;
   timeout.tv_sec = timeout_ms / 1000;
   timeout.tv_usec = (timeout_ms % 1000) * 1000;
   select(0, NULL, NULL, NULL, &timeout);