Bug 2237 - monitor_fdpass.c: poll.h
Summary: monitor_fdpass.c: poll.h
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Miscellaneous (show other bugs)
Version: 6.6p1
Hardware: Other Other
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
: 2260 (view as bug list)
Depends on:
Blocks: V_6_7
  Show dependency treegraph
 
Reported: 2014-04-29 17:36 AEST by rmthwilliams
Modified: 2014-10-08 08:00 AEDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rmthwilliams 2014-04-29 17:36:40 AEST
I am making for QNX 6.3.2 on a Linux server. I have two copies of OpenSSH (and OpenSSL): one to make for a PPC target and one for an X86 target:

./configure --build=i686-pc-linux-gnu --host=powerpc-unknown-nto-qnx6.3.0 --prefix= CC=ntoppc-gcc CFLAGS='-fPIC -I/home/williams/openss/openssl/ppc/install/include' LDFLAGS='-L/opt/qnx632/target/qnx6/ppcbe/lib -L/opt/qnx632/target/qnx6/ppcbe/usr/lib -L/home/williams/openss/openssl/ppc/install/lib' --sysconfdir=/etc/ssh

./configure --build=i686-pc-linux-gnu –host=i386-pc-nto-qnx6.3.0 --prefix= CC=ntox86-gcc CFLAGS='-fPIC -I/home/williams/openss/openssl/x86/install/include' LDFLAGS='-L/opt/qnx632/target/qnx6/x86/lib -L/opt/qnx632/target/qnx6/x86/usr/lib -L/home/williams/openss/openssl/x86/install/lib' --sysconfdir=/etc/ssh

The file monitor_fdpass.c cannot find the file poll.h since it is in the /usr/include/sys directory.  The HAVE_POLL_H is not defined and HAVE_SYS_POLL_H is defined; both are correctly set. mux.c, scp.c, monitor.c, atomicio.c all say:

#ifdef HAVE_POLL_H
#include <poll.h>
#else
# ifdef HAVE_SYS_POLL_H
#  include <sys/poll.h>
# endif
#endif

The only file that does not say this is monitor_fdpass.c which says:

#ifdef HAVE_POLL_H
#include <poll.h>
#endif

and, of course, it cannot find poll.h for my system for that reason. I modified this .c file to match the others to get the system to compile and I think this should apply to the general distribution as well.
Comment 1 Damien Miller 2014-07-03 13:30:32 AEST
I just committed a fix to monitor_fdpass.c that uses sys/poll.h if poll.h doesn't exist. This will be in OpenSSH 6.7 - thanks!
Comment 2 Damien Miller 2014-07-29 09:43:15 AEST
*** Bug 2260 has been marked as a duplicate of this bug. ***
Comment 3 Damien Miller 2014-10-08 08:00:16 AEDT
Close all bugs left open from 6.6 and 6.7 releases.