From: Darren Tucker Date: Fri, 5 Sep 2025 07:17:52 +0000 (+1000) Subject: Create replacement poll.h if needed. X-Git-Tag: V_10_1_P1~118 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d45b17dc5a0598dda2b11dc89598203408d2d59c;p=thirdparty%2Fopenssh-portable.git Create replacement poll.h if needed. Remove #ifdef HAVE_POLL_H wrapper. ok djm@ --- diff --git a/atomicio.c b/atomicio.c index 765073357..58a9512d3 100644 --- a/atomicio.c +++ b/atomicio.c @@ -31,13 +31,7 @@ #include #include -#ifdef HAVE_POLL_H #include -#else -# ifdef HAVE_SYS_POLL_H -# include -# endif -#endif #include #include #include diff --git a/channels.c b/channels.c index 5dbf428aa..b489cb9a9 100644 --- a/channels.c +++ b/channels.c @@ -57,9 +57,7 @@ #include #include #include -#ifdef HAVE_POLL_H #include -#endif #include #include #include diff --git a/clientloop.c b/clientloop.c index 577771f06..38100d18a 100644 --- a/clientloop.c +++ b/clientloop.c @@ -76,9 +76,7 @@ #ifdef HAVE_PATHS_H #include #endif -#ifdef HAVE_POLL_H #include -#endif #include #include #include diff --git a/configure.ac b/configure.ac index fffe2f407..923a01af1 100644 --- a/configure.ac +++ b/configure.ac @@ -481,7 +481,6 @@ AC_CHECK_HEADERS([ \ netgroup.h \ pam/pam_appl.h \ paths.h \ - poll.h \ pty.h \ readpassphrase.h \ rpc/types.h \ @@ -535,10 +534,13 @@ AC_CHECK_HEADERS([ \ # the equivalent file. This avoids having to wrap those includes in # '#ifdef HAVE_FOO_H'. If we create any such headers, add the path to includes. compatincludes=no -AC_CHECK_HEADERS([stdint.h], [], [ +AC_CHECK_HEADERS([poll.h stdint.h], [], [ compatincludes="`pwd`/openbsd-compat/include" mkdir -p "$compatincludes" case "$ac_header" in + poll.h) echo '#ifdef HAVE_SYS_POLL_H' + echo '#include ' + echo '#endif' ;; *) ;; esac >"$compatincludes/$ac_header" ]) diff --git a/kex.c b/kex.c index f8eaa8c97..6e312985f 100644 --- a/kex.c +++ b/kex.c @@ -33,9 +33,7 @@ #include #include #include -#ifdef HAVE_POLL_H #include -#endif #ifdef WITH_OPENSSL #include diff --git a/misc.c b/misc.c index 4e09f2b4b..728e80b04 100644 --- a/misc.c +++ b/misc.c @@ -33,9 +33,7 @@ #ifdef HAVE_LIBGEN_H # include #endif -#ifdef HAVE_POLL_H #include -#endif #ifdef HAVE_NLIST_H #include #endif diff --git a/monitor.c b/monitor.c index d0a2b3f50..166f4d2c4 100644 --- a/monitor.c +++ b/monitor.c @@ -45,13 +45,7 @@ #include #include #include -#ifdef HAVE_POLL_H #include -#else -# ifdef HAVE_SYS_POLL_H -# include -# endif -#endif #ifdef WITH_OPENSSL #include diff --git a/monitor_fdpass.c b/monitor_fdpass.c index d7bf38979..5c0523fb3 100644 --- a/monitor_fdpass.c +++ b/monitor_fdpass.c @@ -37,13 +37,7 @@ #include #include -#ifdef HAVE_POLL_H -# include -#else -# ifdef HAVE_SYS_POLL_H -# include -# endif -#endif +#include #include "log.h" #include "monitor_fdpass.h" diff --git a/mux.c b/mux.c index 542024e7a..103746a90 100644 --- a/mux.c +++ b/mux.c @@ -38,13 +38,7 @@ #include #endif -#ifdef HAVE_POLL_H #include -#else -# ifdef HAVE_SYS_POLL_H -# include -# endif -#endif #ifdef HAVE_UTIL_H # include diff --git a/openbsd-compat/bsd-poll.h b/openbsd-compat/bsd-poll.h index ae865a6e2..67fd8c66f 100644 --- a/openbsd-compat/bsd-poll.h +++ b/openbsd-compat/bsd-poll.h @@ -31,11 +31,7 @@ #define _COMPAT_POLL_H_ #include -#ifdef HAVE_POLL_H -# include -#elif HAVE_SYS_POLL_H -# include -#endif +#include #ifndef HAVE_STRUCT_POLLFD_FD typedef struct pollfd { diff --git a/packet.c b/packet.c index 6dfa7ac31..6af84ed85 100644 --- a/packet.c +++ b/packet.c @@ -58,9 +58,7 @@ #include #include #include -#ifdef HAVE_POLL_H #include -#endif #include #include diff --git a/regress/netcat.c b/regress/netcat.c index 1eac0218a..0acedfd82 100644 --- a/regress/netcat.c +++ b/regress/netcat.c @@ -55,13 +55,7 @@ #include #include "atomicio.h" -#ifdef HAVE_POLL_H #include -#else -# ifdef HAVE_SYS_POLL_H -# include -# endif -#endif #ifdef HAVE_ERR_H # include #endif diff --git a/regress/unittests/misc/test_ptimeout.c b/regress/unittests/misc/test_ptimeout.c index 359a460cc..f56e88996 100644 --- a/regress/unittests/misc/test_ptimeout.c +++ b/regress/unittests/misc/test_ptimeout.c @@ -12,9 +12,7 @@ #include #include #include -#ifdef HAVE_POLL_H -# include -#endif +#include #include #include "../test_helper/test_helper.h" diff --git a/scp.c b/scp.c index f7328e5b3..67bd9d28d 100644 --- a/scp.c +++ b/scp.c @@ -77,13 +77,7 @@ #ifdef HAVE_SYS_STAT_H # include #endif -#ifdef HAVE_POLL_H #include -#else -# ifdef HAVE_SYS_POLL_H -# include -# endif -#endif #ifdef HAVE_SYS_TIME_H # include #endif diff --git a/serverloop.c b/serverloop.c index 4beb2a390..ff207721d 100644 --- a/serverloop.c +++ b/serverloop.c @@ -50,9 +50,7 @@ #include #include #include -#ifdef HAVE_POLL_H #include -#endif #include #include #include diff --git a/sftp-client.c b/sftp-client.c index 3d8bb3496..880064c1e 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -37,13 +37,7 @@ #include #include -#ifdef HAVE_POLL_H #include -#else -# ifdef HAVE_SYS_POLL_H -# include -# endif -#endif #include #include #include diff --git a/sftp-server.c b/sftp-server.c index c3baebd86..0d1452102 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -33,9 +33,7 @@ #include #include #include -#ifdef HAVE_POLL_H #include -#endif #include #include #include diff --git a/ssh-agent.c b/ssh-agent.c index 2c7b94be5..3ea1a4d8d 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -60,9 +60,7 @@ #ifdef HAVE_PATHS_H # include #endif -#ifdef HAVE_POLL_H -# include -#endif +#include #include #include #include diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 914de1244..46208f117 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -26,9 +26,7 @@ #include #include #include -#ifdef HAVE_POLL_H #include -#endif #include #include #include diff --git a/ssh-pkcs11-helper.c b/ssh-pkcs11-helper.c index 32111fef6..279cd1df1 100644 --- a/ssh-pkcs11-helper.c +++ b/ssh-pkcs11-helper.c @@ -24,9 +24,7 @@ #include #include -#ifdef HAVE_POLL_H #include -#endif #include #include #include diff --git a/sshconnect.c b/sshconnect.c index 8ddc531da..8f8e960ec 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -36,9 +36,7 @@ #include #endif #include -#ifdef HAVE_POLL_H #include -#endif #include #include #include diff --git a/sshd.c b/sshd.c index 86c27c44c..60d0d1ff1 100644 --- a/sshd.c +++ b/sshd.c @@ -47,9 +47,7 @@ #include #endif #include -#ifdef HAVE_POLL_H #include -#endif #include #include #include