From ecf62c247a522701c8fd53055e2f2f918123bae3 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 12 Sep 2012 04:54:21 +0000 Subject: [PATCH] Check for and include . This was reported as a build error by John Spencer using musl libc. http://seclists.org/nmap-dev/2012/q3/776 --- nbase/configure | 2 +- nbase/configure.ac | 2 +- nbase/nbase.h | 5 +++++ nbase/nbase_config.h.in | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/nbase/configure b/nbase/configure index 34d199546..17f7f9ef7 100755 --- a/nbase/configure +++ b/nbase/configure @@ -3685,7 +3685,7 @@ fi done -for ac_header in string.h getopt.h strings.h sys/param.h sys/time.h unistd.h errno.h sys/types.h sys/socket.h netinet/in.h arpa/inet.h sys/stat.h netdb.h sys/wait.h fcntl.h sys/resource.h inttypes.h mach-o/dyld.h +for ac_header in string.h getopt.h strings.h sys/param.h sys/time.h unistd.h errno.h sys/select.h sys/types.h sys/socket.h netinet/in.h arpa/inet.h sys/stat.h netdb.h sys/wait.h fcntl.h sys/resource.h inttypes.h mach-o/dyld.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" diff --git a/nbase/configure.ac b/nbase/configure.ac index 2c48d096c..a3420580f 100644 --- a/nbase/configure.ac +++ b/nbase/configure.ac @@ -70,7 +70,7 @@ esac dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS( string.h getopt.h strings.h sys/param.h sys/time.h unistd.h errno.h sys/types.h sys/socket.h netinet/in.h arpa/inet.h sys/stat.h netdb.h sys/wait.h fcntl.h sys/resource.h inttypes.h mach-o/dyld.h) +AC_CHECK_HEADERS( string.h getopt.h strings.h sys/param.h sys/time.h unistd.h errno.h sys/select.h sys/types.h sys/socket.h netinet/in.h arpa/inet.h sys/stat.h netdb.h sys/wait.h fcntl.h sys/resource.h inttypes.h mach-o/dyld.h) AC_HEADER_TIME dnl A special check required for on Darwin. See dnl http://www.gnu.org/software/autoconf/manual/html_node/Header-Portability.html. diff --git a/nbase/nbase.h b/nbase/nbase.h index 4b0c9ed0b..8988b2ca5 100644 --- a/nbase/nbase.h +++ b/nbase/nbase.h @@ -149,6 +149,11 @@ #include #include + +#if HAVE_SYS_SELECT_H +#include +#endif + #if HAVE_SYS_TYPES_H #include #endif diff --git a/nbase/nbase_config.h.in b/nbase/nbase_config.h.in index b8d1c4b08..e64abddb0 100644 --- a/nbase/nbase_config.h.in +++ b/nbase/nbase_config.h.in @@ -138,6 +138,8 @@ #undef HAVE_SYS_PARAM_H +#undef HAVE_SYS_SELECT_H + #undef HAVE_SYS_SOCKIO_H #undef HAVE_SYS_SOCKET_H