- move the includes out of system.h, not commonly needed
- <poll.h> is conditional as we actually provide a fallback through select(),
but for <sys/select.h> missing there's no fallback so doesn't make
much sense to test for (and both poll.h and sys/select.h are posix anyway...)
#include "system.h"
+#include <sys/select.h>
#include <signal.h>
#include <magic.h>
AC_CHECK_HEADERS(limits.h)
AC_CHECK_HEADERS(fcntl.h getopt.h memory.h netdb.h)
-AC_CHECK_HEADERS(sys/ipc.h sys/select.h)
+AC_CHECK_HEADERS(sys/ipc.h)
AC_CHECK_HEADERS(sys/mman.h sys/utsname.h sys/wait.h)
AC_CHECK_HEADERS(mntent.h sys/mnttab.h sys/systemcfg.h)
#include "system.h"
#include <stdarg.h>
+#if defined(HAVE_POLL_H)
+#include <poll.h>
+#else
+#include <sys/select.h>
+#endif
+
#if HAVE_LIBIO_H && defined(_G_IO_IO_FILE_VERSION)
#define _USE_LIBIO 1
#endif
#include <strings.h>
#endif
-#if HAVE_POLL_H
-#include <poll.h>
-#else
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-#endif
-
#if HAVE_GETMNTINFO || HAVE_GETMNTINFO_R || HAVE_MNTCTL
# define GETMNTENT_ONE 0
# define GETMNTENT_TWO 0