diff --git a/defines.h b/defines.h index d99ef68a3..b7dd1d9cf 100644 --- a/defines.h +++ b/defines.h @@ -106,6 +106,7 @@ enum #endif /* MAXPATHLEN */ #ifndef HOST_NAME_MAX +# include "netdb.h" /* for MAXHOSTNAMELEN */ # if defined(_POSIX_HOST_NAME_MAX) # define HOST_NAME_MAX _POSIX_HOST_NAME_MAX # elif defined(MAXHOSTNAMELEN) diff --git a/includes.h b/includes.h index c3034e37d..2893a54cd 100644 --- a/includes.h +++ b/includes.h @@ -27,7 +27,7 @@ #include /* For CMSG_* */ #ifdef HAVE_LIMITS_H -# include /* For PATH_MAX */ +# include /* For PATH_MAX, _POSIX_HOST_NAME_MAX */ #endif #ifdef HAVE_BSTRING_H # include