Browse Source

build: fixed build for systems with select() in unistd.h

Closes #5169
Harry Sintonen 4 years ago
parent
commit
7a71965e97
8 changed files with 18 additions and 0 deletions
  1. 4 0
      acinclude.m4
  2. 2 0
      configure.ac
  3. 2 0
      lib/dict.c
  4. 2 0
      lib/select.c
  5. 2 0
      lib/transfer.c
  6. 2 0
      src/tool_operate.c
  7. 2 0
      src/tool_sleep.c
  8. 2 0
      tests/libtest/test.h

+ 4 - 0
acinclude.m4

@@ -1887,6 +1887,8 @@ struct Library *SocketBase = NULL;
 #endif
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
 #endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
@@ -1950,6 +1952,8 @@ struct Library *SocketBase = NULL;
 #endif
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
 #endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>

+ 2 - 0
configure.ac

@@ -3887,6 +3887,8 @@ dnl default includes
 #endif
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
 #endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>

+ 2 - 0
lib/dict.c

@@ -46,6 +46,8 @@
 
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
 #endif
 
 #include "urldata.h"

+ 2 - 0
lib/select.c

@@ -24,6 +24,8 @@
 
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
 #endif
 
 #if !defined(HAVE_SELECT) && !defined(HAVE_POLL_FINE)

+ 2 - 0
lib/transfer.c

@@ -48,6 +48,8 @@
 
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
 #endif
 
 #ifndef HAVE_SOCKET

+ 2 - 0
src/tool_operate.c

@@ -31,6 +31,8 @@
 
 #ifdef HAVE_SYS_SELECT_H
 #  include <sys/select.h>
+#elif defined(HAVE_UNISTD_H)
+#  include <unistd.h>
 #endif
 
 #ifdef __VMS

+ 2 - 0
src/tool_sleep.c

@@ -23,6 +23,8 @@
 
 #ifdef HAVE_SYS_SELECT_H
 #  include <sys/select.h>
+#elif defined(HAVE_UNISTD_H)
+#  include <unistd.h>
 #endif
 
 #ifdef HAVE_POLL_H

+ 2 - 0
tests/libtest/test.h

@@ -36,6 +36,8 @@
 #ifdef HAVE_SYS_SELECT_H
 /* since so many tests use select(), we can just as well include it here */
 #include <sys/select.h>
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
 #endif
 
 #ifdef TPF