OpenSSH 10.2p1 on OS X 10.3 (darwin 7)
Darren Tucker
dtucker at dtucker.net
Thu Oct 16 21:24:24 AEDT 2025
On Thu, 16 Oct 2025 at 20:40, Sevan Janiyan <venture37+openssh at geeklan.co.uk>
wrote:
> Hi,
> Managed to get OpenSSH 10.2p1 built on OS X 10.3 with OpenSSL 3.2.x,
> pretty much built out of the box with just one change needed for poll(2).
> [...]
> /usr/include/poll.h:
> 95 #if (__STDC__ > 0) || defined(__cplusplus)
> 96 extern int poll (struct pollfd *pArray, unsigned long n_fds, int
> [...]
> OS doesn't come with nfds_t defined.
> 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).
> 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?
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.
--
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.
More information about the openssh-unix-dev
mailing list