[openssh-commits] [openssh] 02/04: OSX lacks HOST_NAME_MAX, has _POSIX_HOST_NAME_MAX

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Jan 27 23:08:10 AEDT 2015


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit a2c95c1bf33ea53038324d1fdd774bc953f98236
Author: Damien Miller <djm at mindrot.org>
Date:   Tue Jan 27 23:06:59 2015 +1100

    OSX lacks HOST_NAME_MAX, has _POSIX_HOST_NAME_MAX
---
 defines.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/defines.h b/defines.h
index 3ac8be9..f489196 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

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list