diff --git a/defines.h b/defines.h index 3ac8be987..f489196ed 100644 --- a/defines.h +++ b/defines.h @@ -105,6 +105,14 @@ enum # endif /* PATH_MAX */ #endif /* MAXPATHLEN */ +#ifndef HOST_NAME_MAX +# if defined(_POSIX_HOST_NAME_MAX) +# define HOST_NAME_MAX _POSIX_HOST_NAME_MAX +# elif defined(MAXHOSTNAMELEN) +# define HOST_NAME_MAX MAXHOSTNAMELEN +# endif +#endif /* HOST_NAME_MAX */ + #if defined(HAVE_DECL_MAXSYMLINKS) && HAVE_DECL_MAXSYMLINKS == 0 # define MAXSYMLINKS 5 #endif