summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2015-01-27 23:06:59 +1100
committerDamien Miller <djm@mindrot.org>2015-01-27 23:06:59 +1100
commita2c95c1bf33ea53038324d1fdd774bc953f98236 (patch)
tree395ed03ce58ef1f750b15f11741e5e7ec50dbfd7 /defines.h
parentade31d7b6f608a19b85bee29a7a00b1e636a2919 (diff)
downloadopenssh-git-a2c95c1bf33ea53038324d1fdd774bc953f98236.tar.gz
OSX lacks HOST_NAME_MAX, has _POSIX_HOST_NAME_MAX
Diffstat (limited to 'defines.h')
-rw-r--r--defines.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/defines.h b/defines.h
index 3ac8be98..f489196e 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