On 16/10/2025 12:02, Darren Tucker wrote:> I think this should do it. Note that you will need to run "autoreconf" > to rebuild configure before running it.Thanks for the patch. There's a mistake in the patch with regards to handling action-if-true/false in the AC_COMPILE_IFELSE block, where it detects poll nfds_t is unsigned long but POLL_NFDS_T_ULONG is never defined.> diff --git a/configure.ac b/configure.ac > index db5211013..0c237ac78 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -3773,6 +3773,24 @@ AC_CHECK_TYPES([nfds_t], , , [ > #endif > ]) > > +if test "x$ac_cv_type_nfds_t" != "xyes"; then > + AC_MSG_CHECKING([if poll nfds_t is unsigned long]) > + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ > +#include <sys/types.h> > +#ifdef HAVE_POLL_H > +#include <poll.h> > +#endif > +#ifdef HAVE_SYS_POLL_H > +#include <sys/poll.h> > +#endif > + int poll(struct pollfd *, unsigned long, int timeout); > + ]], [[return poll(0, 0, 0);]])], > + AC_MSG_RESULT([yes]), > + [AC_DEFINE(POLL_NFDS_T_ULONG, 1, [Define if poll 2nd arg is ulong]) > + AC_MSG_RESULT([no])] > + ) > +fi > + > # Decide which sandbox style to use > sandbox_arg="" > AC_ARG_WITH([sandbox],Fixing that with int poll(struct pollfd *, unsigned long, int timeout); ]], [[return poll(0, 0, 0);]])], [ AC_MSG_RESULT([yes]) AC_DEFINE(POLL_NFDS_T_ULONG, [1], [Define if poll 2nd arg is ulong]) ], [ AC_MSG_RESULT([no])]seems to work and the build then succeeds out of the box.Sincerely, Sevan
On 16/10/2025 14:15, Sevan Janiyan wrote:> Fixing that with???????????? int poll(struct pollfd *, unsigned long, > int timeout); > ??????????? ]], [[return poll(0, 0, 0);]])], > ??????????? [ AC_MSG_RESULT([yes]) > ????????????? AC_DEFINE(POLL_NFDS_T_ULONG, [1], [Define if poll 2nd arg > is ulong]) ], > ??????????? [ AC_MSG_RESULT([no])]seems to work and the build then > succeeds out of the box.Sincerely,Looks like it got mangled. Hopefully this diff wont. --- configure.ac.orig 2025-10-10 03:38:31.000000000 +0100 +++ configure.ac 2025-10-16 13:40:54.000000000 +0100 @@ -3773,6 +3773,24 @@ #endif ]) +if test "x$ac_cv_type_nfds_t" != "xyes"; then + AC_MSG_CHECKING([if poll nfds_t is unsigned long]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include <sys/types.h> +#ifdef HAVE_POLL_H +#include <poll.h> +#endif +#ifdef HAVE_SYS_POLL_H +#include <sys/poll.h> +#endif + int poll(struct pollfd *, unsigned long, int timeout); + ]], [[return poll(0, 0, 0);]])], + [ AC_MSG_RESULT([yes]) + AC_DEFINE(POLL_NFDS_T_ULONG, [1], [Define if poll 2nd arg is ulong]) ], + [ AC_MSG_RESULT([no])] + ) +fi + # Decide which sandbox style to use sandbox_arg="" AC_ARG_WITH([sandbox],
On Fri, 17 Oct 2025 at 00:15, Sevan Janiyan <venture37+openssh at geeklan.co.uk> wrote:> On 16/10/2025 12:02, Darren Tucker wrote: > > I think this should do it. Note that you will need to run "autoreconf" > > to rebuild configure before running it. > > Thanks for the patch. > There's a mistake in the patch with regards to handling > action-if-true/false in the AC_COMPILE_IFELSE block, where it detects > poll nfds_t is unsigned long but POLL_NFDS_T_ULONG is never defined. >Thanks, I originally wrote the test the other way around, then decided to switch to keeping the existing behaviour by default but missed that part, and didn't have an old enough mac to test it :-) I have committed it to both the main and 10.2 branch. Please let me know if there are any issues with what's in there. -- Darren Tucker (dtucker at dtucker.net) GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.