]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Create replacement poll.h if needed.
authorDarren Tucker <dtucker@dtucker.net>
Fri, 5 Sep 2025 07:17:52 +0000 (17:17 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 5 Sep 2025 07:17:52 +0000 (17:17 +1000)
Remove #ifdef HAVE_POLL_H wrapper.  ok djm@

22 files changed:
atomicio.c
channels.c
clientloop.c
configure.ac
kex.c
misc.c
monitor.c
monitor_fdpass.c
mux.c
openbsd-compat/bsd-poll.h
packet.c
regress/netcat.c
regress/unittests/misc/test_ptimeout.c
scp.c
serverloop.c
sftp-client.c
sftp-server.c
ssh-agent.c
ssh-keyscan.c
ssh-pkcs11-helper.c
sshconnect.c
sshd.c

index 765073357f67342f8b5f21ac869629c0c9260c7a..58a9512d3e4aeca659b3e213dfbf469e15595424 100644 (file)
 #include <sys/uio.h>
 
 #include <errno.h>
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#else
-# ifdef HAVE_SYS_POLL_H
-#  include <sys/poll.h>
-# endif
-#endif
 #include <string.h>
 #include <unistd.h>
 #include <limits.h>
index 5dbf428aa1cd2896d032a1b35b50ccb421f19ac9..b489cb9a9c9a8767792d9d5f096cea45f622c6e2 100644 (file)
@@ -57,9 +57,7 @@
 #include <fcntl.h>
 #include <limits.h>
 #include <netdb.h>
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#endif
 #include <stdarg.h>
 #include <stdint.h>
 #include <stdio.h>
index 577771f06963cc7f19cbb42e4648541b48d5c89c..38100d18a7cde1a6f6af6cbbea9dbcbdb570db74 100644 (file)
@@ -76,9 +76,7 @@
 #ifdef HAVE_PATHS_H
 #include <paths.h>
 #endif
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#endif
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
index fffe2f407a72c2c486dafbfd08c15477eb4c1f4c..923a01af1bcce3103388847abd6be760ce3866f1 100644 (file)
@@ -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 <sys/poll.h>'
+            echo '#endif' ;;
     *)      ;;
     esac >"$compatincludes/$ac_header"
 ])
diff --git a/kex.c b/kex.c
index f8eaa8c970c6052e5b0812c631fa185358d44c0d..6e312985f8c9e673df8557e273d00f84a9ed2a75 100644 (file)
--- a/kex.c
+++ b/kex.c
@@ -33,9 +33,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#endif
 
 #ifdef WITH_OPENSSL
 #include <openssl/crypto.h>
diff --git a/misc.c b/misc.c
index 4e09f2b4b2eba36eccdb8fe95d9d7d7180245390..728e80b04b9824b39299899a68853d67c202fe63 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -33,9 +33,7 @@
 #ifdef HAVE_LIBGEN_H
 # include <libgen.h>
 #endif
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#endif
 #ifdef HAVE_NLIST_H
 #include <nlist.h>
 #endif
index d0a2b3f50f21955fbde6b0ad535e4c1ebeb86a78..166f4d2c4fa2ff998325d1f7102078afea3ee281 100644 (file)
--- a/monitor.c
+++ b/monitor.c
 #include <stdarg.h>
 #include <stdio.h>
 #include <unistd.h>
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#else
-# ifdef HAVE_SYS_POLL_H
-#  include <sys/poll.h>
-# endif
-#endif
 
 #ifdef WITH_OPENSSL
 #include <openssl/dh.h>
index d7bf38979b0ce86023499eb44206c0c5d57fa3fa..5c0523fb33fc9883ca913081fc19328ce579423f 100644 (file)
 #include <string.h>
 #include <stdarg.h>
 
-#ifdef HAVE_POLL_H
-# include <poll.h>
-#else
-# ifdef HAVE_SYS_POLL_H
-#  include <sys/poll.h>
-# endif
-#endif
+#include <poll.h>
 
 #include "log.h"
 #include "monitor_fdpass.h"
diff --git a/mux.c b/mux.c
index 542024e7a4481e8012f6856c902718ad5e75fad3..103746a902b4e005b516ea07a187e6bf89bf696c 100644 (file)
--- a/mux.c
+++ b/mux.c
 #include <paths.h>
 #endif
 
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#else
-# ifdef HAVE_SYS_POLL_H
-#  include <sys/poll.h>
-# endif
-#endif
 
 #ifdef HAVE_UTIL_H
 # include <util.h>
index ae865a6e26224f0fa3e38586a29b453b7aefb21b..67fd8c66f80344e73c75203b5d34d9ba1b45c923 100644 (file)
 #define        _COMPAT_POLL_H_
 
 #include <sys/types.h>
-#ifdef HAVE_POLL_H
-# include <poll.h>
-#elif HAVE_SYS_POLL_H
-# include <sys/poll.h>
-#endif
+#include <poll.h>
 
 #ifndef HAVE_STRUCT_POLLFD_FD
 typedef struct pollfd {
index 6dfa7ac31a95a6dd8545178142e6e741e6be674a..6af84ed85d1ecebd0ea0a69549ad3b3dce429c85 100644 (file)
--- a/packet.c
+++ b/packet.c
@@ -58,9 +58,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <limits.h>
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#endif
 #include <signal.h>
 #include <time.h>
 
index 1eac0218aaf13f08778d3e1d6eb9fb757f40bd6a..0acedfd82493b6aafb62f5a9abf8997b4697053d 100644 (file)
 #include <unistd.h>
 #include "atomicio.h"
 
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#else
-# ifdef HAVE_SYS_POLL_H
-#  include <sys/poll.h>
-# endif
-#endif
 #ifdef HAVE_ERR_H
 # include <err.h>
 #endif
index 359a460cc81bac613642d9cf94ee075211ea2dfe..f56e88996cebe6037202d73ff7fc6ae6c73d12d8 100644 (file)
@@ -12,9 +12,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
-#ifdef HAVE_POLL_H
-# include <poll.h>
-#endif
+#include <poll.h>
 #include <time.h>
 
 #include "../test_helper/test_helper.h"
diff --git a/scp.c b/scp.c
index f7328e5b3baa801556712d8b0f89eb53a519bfd8..67bd9d28dcae73c5029fd9debe013ed52ec6d980 100644 (file)
--- a/scp.c
+++ b/scp.c
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#else
-# ifdef HAVE_SYS_POLL_H
-#  include <sys/poll.h>
-# endif
-#endif
 #ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
 #endif
index 4beb2a390b6d6f8f6ae92e1085f482554ac34b72..ff207721d90d70eabb2797408379af3c2777a47e 100644 (file)
@@ -50,9 +50,7 @@
 #include <fcntl.h>
 #include <pwd.h>
 #include <limits.h>
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#endif
 #include <signal.h>
 #include <string.h>
 #include <termios.h>
index 3d8bb34961c9c572d2754a67ef1392dd65b8906e..880064c1e1efd185fdf2ec4cfe6ec83676613a9b 100644 (file)
 
 #include <dirent.h>
 #include <errno.h>
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#else
-# ifdef HAVE_SYS_POLL_H
-#  include <sys/poll.h>
-# endif
-#endif
 #include <fcntl.h>
 #include <signal.h>
 #include <stdarg.h>
index c3baebd86410126425f400f8784d76462b87cd06..0d14521029ca060c2cb2781564418ca1cd81c03b 100644 (file)
@@ -33,9 +33,7 @@
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#endif
 #include <pwd.h>
 #include <grp.h>
 #include <stdlib.h>
index 2c7b94be55f2073eda45fe67ae4ca64ce7820526..3ea1a4d8d1263ba47cb199aaf758d7f8817b0cee 100644 (file)
@@ -60,9 +60,7 @@
 #ifdef HAVE_PATHS_H
 # include <paths.h>
 #endif
-#ifdef HAVE_POLL_H
-# include <poll.h>
-#endif
+#include <poll.h>
 #include <signal.h>
 #include <stdarg.h>
 #include <stdio.h>
index 914de1244dd44c313ec1c5be96af5ea15af6ef26..46208f117f0c00332f20a74deb5b96d2c1e7a6a5 100644 (file)
@@ -26,9 +26,7 @@
 #include <limits.h>
 #include <netdb.h>
 #include <errno.h>
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#endif
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
index 32111fef6b29addef80480683d17a375ae27f91e..279cd1df1e2457e11e123afb81f81c45f48ed79e 100644 (file)
@@ -24,9 +24,7 @@
 
 #include <stdlib.h>
 #include <errno.h>
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#endif
 #include <stdarg.h>
 #include <string.h>
 #include <unistd.h>
index 8ddc531da5715e031d82e15a3225624de2b2faad..8f8e960ec3d8d1397e7ceccddc7812081674cab4 100644 (file)
@@ -36,9 +36,7 @@
 #include <paths.h>
 #endif
 #include <pwd.h>
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#endif
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/sshd.c b/sshd.c
index 86c27c44c9b14a2fbb1f619889298dc5b7bff75b..60d0d1ff19fb321b12af929f5200a85efecfc483 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -47,9 +47,7 @@
 #include <paths.h>
 #endif
 #include <grp.h>
-#ifdef HAVE_POLL_H
 #include <poll.h>
-#endif
 #include <pwd.h>
 #include <signal.h>
 #include <stdarg.h>