Call for testing: OpenSSH 6.8

Damien Miller djm at mindrot.org
Wed Feb 25 09:08:28 AEDT 2015


On Tue, 24 Feb 2015, Tim Rice wrote:

> I should have spotted that netdb.h was not included yet
> Perhaps
> .....
> --- defines.h.old	2015-02-23 21:35:19.098756406 -0800
> +++ defines.h	2015-02-24 12:22:24.916077846 -0800
> @@ -108,10 +108,9 @@
>  #ifndef HOST_NAME_MAX
>  # if defined(_POSIX_HOST_NAME_MAX)
>  #  define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
> -# elif defined(MAXHOSTNAMELEN)
> +# elif defined(HAVE_NETDB_H)
> +#  include <netdb.h>

I don't think there is any need for "elif defined(HAVE_NETDB_H)" since
we unconditionally include netdb.h in a few places already.

diff --git defines.h defines.h
index d99ef68..b7dd1d9 100644
--- defines.h
+++ defines.h
@@ -106,6 +106,7 @@ enum
 #endif /* MAXPATHLEN */
 
 #ifndef HOST_NAME_MAX
+# include "netdb.h" /* for MAXHOSTNAMELEN */
 # if defined(_POSIX_HOST_NAME_MAX)
 #  define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
 # elif defined(MAXHOSTNAMELEN)
diff --git includes.h includes.h
index c3034e3..2893a54 100644
--- includes.h
+++ includes.h
@@ -27,7 +27,7 @@
 #include <sys/socket.h> /* For CMSG_* */
 
 #ifdef HAVE_LIMITS_H
-# include <limits.h> /* For PATH_MAX */
+# include <limits.h> /* For PATH_MAX, _POSIX_HOST_NAME_MAX */
 #endif
 #ifdef HAVE_BSTRING_H
 # include <bstring.h>


More information about the openssh-unix-dev mailing list