]> git.sur5r.net Git - openldap/commitdiff
ITS#4674 fix poll detection
authorHoward Chu <hyc@openldap.org>
Thu, 21 Sep 2006 17:54:37 +0000 (17:54 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 21 Sep 2006 17:54:37 +0000 (17:54 +0000)
configure.in
include/ac/socket.h

index ea88615fae60395bae91ea11ff73e812914c854a..118a568f0d48b0c311f341020ebe2c9f19a9e217 100644 (file)
@@ -950,7 +950,9 @@ dnl AC_SYS_RESTARTABLE_SYSCALLS
 
 dnl ----------------------------------------------------------------
 AC_CHECK_FUNCS( poll )
-AC_CHECK_HEADERS( poll.h )
+if test $ac_cv_func_poll = yes; then
+AC_CHECK_HEADERS( poll.h sys/poll.h )
+fi
 
 dnl ----------------------------------------------------------------
 AC_CHECK_HEADERS( sys/epoll.h )
index 8522f76f9063e1e0ff80c1a087f26298c7b34f0c..4f2ed14812940e6fd30a5a10f7b2dac173bb2de0 100644 (file)
@@ -24,6 +24,9 @@
 #ifdef HAVE_POLL_H
 #include <poll.h>
 #endif
+#ifdef HAVE_SYS_POLL_H
+#include <sys/poll.h>
+#endif
 
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
@@ -220,7 +223,7 @@ LDAP_LUTIL_F( int ) getpeereid( int s, uid_t *, gid_t * );
 #define        NI_MAXHOST      256
 #endif
 
-#ifdef HAVE_POLL_H
+#ifdef HAVE_POLL
 # ifndef INFTIM
 #  define INFTIM (-1)
 # endif