poll.h vs sys/poll.h on QNX Neutrino

David Bacon bacon at cs.nyu.edu
Tue Sep 25 01:38:09 EST 2007


This works fine.

       dB

Darren Tucker wrote, circa 2007-09-20 21:02 MDT:
> On Tue, Sep 18, 2007 at 05:52:45PM -0600, David Bacon wrote:
>> [...]  Some older
>> systems, and some not-quite-XSI-compliant
>> systems such as QNX Neutrino, still have
>> <sys/poll.h> but not <poll.h>.
>>
>> I suggest having configure.ac look for
>> both, and put the check for <poll.h> first
>> in atomicio.c, as in:
> 
> Sounds reasonable.  Could you please confirm that this works?  You will need
> to run "autoreconf" to rebuild configure, then re-run configure.  Thanks.
> 
> 
> Index: configure.ac
> ===================================================================
> RCS file: /usr/local/src/security/openssh/cvs/openssh/configure.ac,v
> retrieving revision 1.384
> diff -u -p -r1.384 configure.ac
> --- configure.ac	10 Sep 2007 23:24:18 -0000	1.384
> +++ configure.ac	21 Sep 2007 02:59:09 -0000
> @@ -223,6 +223,7 @@ AC_CHECK_HEADERS( \
>  	sys/dir.h \
>  	sys/mman.h \
>  	sys/ndir.h \
> +	sys/poll.h \
>  	sys/prctl.h \
>  	sys/pstat.h \
>  	sys/select.h \
> Index: atomicio.c
> ===================================================================
> RCS file: /usr/local/src/security/openssh/cvs/openssh/atomicio.c,v
> retrieving revision 1.35
> diff -u -p -r1.35 atomicio.c
> --- atomicio.c	25 Jun 2007 12:15:12 -0000	1.35
> +++ atomicio.c	21 Sep 2007 02:57:54 -0000
> @@ -34,6 +34,10 @@
>  #include <errno.h>
>  #ifdef HAVE_POLL_H
>  #include <poll.h>
> +#else
> +# ifdef HAVE_SYS_POLL_H
> +#  include <sys/poll.h>
> +# endif
>  #endif
>  #include <string.h>
>  #include <unistd.h>
> 


More information about the openssh-unix-dev mailing list