#endif
])
+if test "x$ac_cv_type_nfds_t" != "xyes"; then
+ AC_MSG_CHECKING([if poll nfds_t is unsigned long])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
+#ifdef HAVE_SYS_POLL_H
+#include <sys/poll.h>
+#endif
+ int poll(struct pollfd *, unsigned long, int timeout);
+ ]], [[return poll(0, 0, 0);]])],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE(POLL_NFDS_T_ULONG, 1, [Define if poll 2nd arg is ulong])],
+ [AC_MSG_RESULT([no])]
+ )
+fi
+
# Decide which sandbox style to use
sandbox_arg=""
AC_ARG_WITH([sandbox],
#endif /* !HAVE_STRUCT_POLLFD_FD */
#ifndef HAVE_NFDS_T
+# ifdef POLL_NFDS_T_ULONG
+typedef unsigned long nfds_t;
+# else
typedef unsigned int nfds_t;
+# endif
#endif
#ifndef HAVE_POLL