From: Harry Sintonen Date: Mon, 30 Mar 2020 13:52:43 +0000 (+0300) Subject: build: fixed build for systems with select() in unistd.h X-Git-Tag: curl-7_70_0~158 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7a71965e9;p=thirdparty%2Fcurl.git build: fixed build for systems with select() in unistd.h Closes #5169 --- diff --git a/acinclude.m4 b/acinclude.m4 index 3ad55c3885..089449bac4 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1887,6 +1887,8 @@ struct Library *SocketBase = NULL; #endif #ifdef HAVE_SYS_SELECT_H #include +#elif defined(HAVE_UNISTD_H) +#include #endif #ifdef HAVE_SYS_SOCKET_H #include @@ -1950,6 +1952,8 @@ struct Library *SocketBase = NULL; #endif #ifdef HAVE_SYS_SELECT_H #include +#elif defined(HAVE_UNISTD_H) +#include #endif #ifdef HAVE_SYS_SOCKET_H #include diff --git a/configure.ac b/configure.ac index 31fc8ffb7c..90a678ec8c 100755 --- a/configure.ac +++ b/configure.ac @@ -3887,6 +3887,8 @@ dnl default includes #endif #ifdef HAVE_SYS_SELECT_H #include +#elif defined(HAVE_UNISTD_H) +#include #endif #ifdef HAVE_SYS_SOCKET_H #include diff --git a/lib/dict.c b/lib/dict.c index 208a2336fd..e42165a9e6 100644 --- a/lib/dict.c +++ b/lib/dict.c @@ -46,6 +46,8 @@ #ifdef HAVE_SYS_SELECT_H #include +#elif defined(HAVE_UNISTD_H) +#include #endif #include "urldata.h" diff --git a/lib/select.c b/lib/select.c index 1ab0239342..857e7f698d 100644 --- a/lib/select.c +++ b/lib/select.c @@ -24,6 +24,8 @@ #ifdef HAVE_SYS_SELECT_H #include +#elif defined(HAVE_UNISTD_H) +#include #endif #if !defined(HAVE_SELECT) && !defined(HAVE_POLL_FINE) diff --git a/lib/transfer.c b/lib/transfer.c index 72168336a1..27c984f8f8 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -48,6 +48,8 @@ #ifdef HAVE_SYS_SELECT_H #include +#elif defined(HAVE_UNISTD_H) +#include #endif #ifndef HAVE_SOCKET diff --git a/src/tool_operate.c b/src/tool_operate.c index 3c7dd6829f..e1c9c6251d 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -31,6 +31,8 @@ #ifdef HAVE_SYS_SELECT_H # include +#elif defined(HAVE_UNISTD_H) +# include #endif #ifdef __VMS diff --git a/src/tool_sleep.c b/src/tool_sleep.c index 67a54435f4..e842ba93bc 100644 --- a/src/tool_sleep.c +++ b/src/tool_sleep.c @@ -23,6 +23,8 @@ #ifdef HAVE_SYS_SELECT_H # include +#elif defined(HAVE_UNISTD_H) +# include #endif #ifdef HAVE_POLL_H diff --git a/tests/libtest/test.h b/tests/libtest/test.h index 4f2af415a8..4806375a09 100644 --- a/tests/libtest/test.h +++ b/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 +#elif defined(HAVE_UNISTD_H) +#include #endif #ifdef TPF