OpenSSH 10.2p1 on OS X 10.3 (darwin 7)
Sevan Janiyan
venture37+openssh at geeklan.co.uk
Thu Oct 16 22:47:15 AEDT 2025
On 16/10/2025 11:24, Darren Tucker wrote:
>> I changed the signature in bsd-poll.c so nfds is unsigned long instead
>
> Unfortunately we can't take such a change as it'll break things that
> implement poll() as specified by POSIX (
> https://pubs.opengroup.org/onlinepubs/7908799/xsh/poll.html).
Understood.
>> of nfds_t to match system header (bsd-poll.h, typedefs it to unsigned
>> int if nfds_t is not available) and the build succeeded without issue.
>>
> If the system doesn't have it, the compat headers will define it as:
>
> #ifndef HAVE_NFDS_T
> typedef unsigned int nfds_t;
> #endif
>
> Does changing "unsigned int" to "unsigned long" make it compile?
It does.
I made the following change and 'make tests' built successfully. The run
of regress will take some hours to complete on the G3.
--- openbsd-compat/bsd-poll.h.orig Fri Oct 10 03:38:31 2025
+++ openbsd-compat/bsd-poll.h Thu Oct 16 12:02:42 2025
@@ -72,7 +72,7 @@
#endif /* !HAVE_STRUCT_POLLFD_FD */
#ifndef HAVE_NFDS_T
-typedef unsigned int nfds_t;
+typedef unsigned long nfds_t;
#endif
#ifndef HAVE_POLL
> The only requirements specified for nfds_t is "An unsigned integral type
> used for the number of file descriptors." so we could either change it
> unconditionally (although I'd worry about breaking something in the
> opposite direction) or have configure try to figure out which it is and use
> that.
I'll give the patch in the follow up email you sent a try & reply back.
Sincerely,
Sevan
More information about the openssh-unix-dev
mailing list