diff options
author | Damien Miller <djm@mindrot.org> | 2015-01-27 23:06:59 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-27 23:06:59 +1100 |
commit | a2c95c1bf33ea53038324d1fdd774bc953f98236 (patch) | |
tree | 395ed03ce58ef1f750b15f11741e5e7ec50dbfd7 /defines.h | |
parent | ade31d7b6f608a19b85bee29a7a00b1e636a2919 (diff) |
OSX lacks HOST_NAME_MAX, has _POSIX_HOST_NAME_MAX
Diffstat (limited to 'defines.h')
-rw-r--r-- | defines.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |