From 7dddeeebbe55bb1d596b1ffd7932e5954b20950d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 2 Aug 2026 21:32:11 +1000 Subject: [PATCH] build: require , not just poll() io.c and socket.c include unconditionally, but configure only required the function. A system that exposes poll() through some other header would pass configure and then fail to compile -- the AC_CHECK_HEADERS result for poll.h was collected and never used. Require the header too, with its own message. Verified both ways: a normal configure still succeeds, and forcing ac_cv_header_poll_h=no now stops with "rsync requires " rather than failing later in the build. (cherry picked from commit a0952930a16c7e9cafd3e41a22521770b54d3970) --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index ae8889fb..90452aff 100644 --- a/configure.ac +++ b/configure.ac @@ -875,7 +875,14 @@ dnl rsync's I/O readiness loops use poll() rather than select() so that a dnl file descriptor at or above FD_SETSIZE cannot overflow an fd_set (which dnl is undefined behaviour and could hang the transfer). poll() is in dnl POSIX.1-2001; fail early and clearly if this target lacks it. +dnl +dnl io.c and socket.c include unconditionally, so the HEADER has to +dnl be required too: a system that exposes poll() through some other header +dnl would otherwise pass configure and then fail to compile. AC_CHECK_FUNCS([poll], , [AC_MSG_ERROR([rsync requires poll(); please report the platform to the rsync developers])]) +if test x"$ac_cv_header_poll_h" != x"yes"; then + AC_MSG_ERROR([rsync requires ; please report the platform to the rsync developers]) +fi AC_CHECK_FUNCS(strcasecmp) if test x"$ac_cv_func_strcasecmp" = x"no"; then