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).
cc -std=gnu99 -g -O2 -pipe -Wall -Wpointer-arith -Wuninitialized 
-Wsign-compare -Wformat-security -Wno-unused-parameter 
-Wimplicit-fallthrough -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv 
-fno-builtin-memset   -fPIC -I. -I.. -I. -I./.. 
-I"/Users/sme/Downloads/openssh-10.2p1/openbsd-compat/include" 
-I/opt/tools/include  -DOPENSSL_API_COMPAT=0x10100000L -DHAVE_CONFIG_H 
-c bsd-poll.c
bsd-poll.c:101: error: conflicting types for `poll'
/usr/include/poll.h:96: error: previous declaration of `poll'
/usr/include/poll.h:
95 #if (__STDC__ > 0) || defined(__cplusplus)
96 extern int poll (struct pollfd *pArray, unsigned long n_fds, int 
timeout);
97 #else
98 extern int poll();
99 #endif
bsd-poll.c:
#if !defined(HAVE_POLL) || defined(BROKEN_POLL)
int
poll(struct pollfd *fds, nfds_t nfds, int timeout)
{
         struct timespec ts, *tsp = NULL;
         /* poll timeout is msec, ppoll is timespec (sec + nsec) */
         if (timeout >= 0) {
                 ts.tv_sec = timeout / 1000;
                 ts.tv_nsec = (timeout % 1000) * 1000000;
                 tsp = &ts;
         }
         return ppoll(fds, nfds, tsp, NULL);
}
#endif /* !HAVE_POLL || BROKEN_POLL */
OS doesn't come with nfds_t defined.
I changed  the signature in bsd-poll.c so nfds is unsigned long instead 
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.
All tests passed.
Submitted the survey from the system.
Sincerely,
Sevan
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 insteadUnfortunately 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.