OSX lacks HOST_NAME_MAX, has _POSIX_HOST_NAME_MAX

This commit is contained in:
Damien Miller 2015-01-27 23:06:59 +11:00
parent ade31d7b6f
commit a2c95c1bf3
1 changed files with 8 additions and 0 deletions

View File

@ -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