diff --git a/configure.ac b/configure.ac index 4132a81..060ad0c 100644 --- a/configure.ac +++ b/configure.ac @@ -383,7 +383,7 @@ AC_DEFINE(ANSI_CPP, 1, [FIXME HARD]) # The UNIX extension likes to know which of the following system calls, # library functions, and include files are supported by the system. -AC_CHECK_HEADERS(utime.h sys/utime.h sys/wait.h dirent.h) +AC_CHECK_HEADERS(utime.h sys/utime.h sys/wait.h dirent.h netdb.h) AC_CHECK_FUNCS(waitpid wait3 wait4 vfork uname gethostname gettimeofday ftime) AC_CHECK_FUNCS(mktemp tmpnam tempnam getcwd getwd rename regcomp) diff --git a/lib/unix/system.c b/lib/unix/system.c index 647843e..ecc2eed 100644 --- a/lib/unix/system.c +++ b/lib/unix/system.c @@ -35,6 +35,9 @@ #if defined(HAVE_UNAME) && !defined(HAVE_GETHOSTNAME) # include #endif +#ifdef HAVE_NETDB_H +# include +#endif #define L_LINK_MAX 0 #define L_NAME_MAX 1