On Wed, 25 Feb 2015, Damien Miller wrote: | On Tue, 24 Feb 2015, Tom G. Christensen wrote: | | > I've switched to HEAD in the git repo and it now builds on Solaris | > 2.6, 7, 8 and 9 but the testsuite still cannot be built due to the | > missing <err.h>. The err.h issue is fixes but there still msghdr structure differences to deal with. [more below] | > I noticed one of the changes was about HOST_NAME_MAX but I don't | > think that change addresses the real issue on at least these old | > Solaris systems. It looks to me like the fall back in defines.h | > was not activated because Solaris has MAXHOSTNAMELEN in <netdb.h> | > which has not been included when defines.h tries to find a fall back | > HOST_NAME_MAX. | > | > Looking at sshd.c with gcc -dD -E confirms it as defines.h now set | > HOST_NAME_MAX to 255 and later <netdb.h> is included which then | > defines MAXHOSTNAMELEN to 256. | > | > I don't know if it would be reasonable to include <netdb.h> | > from includes.h but that would make HOST_NAME_MAX fall back to | > MAXHOSTNAMELEN on at least Solaris < 10. | | I guess we could do this: | | diff --git includes.h includes.h | index c3034e3..ec74998 100644 | --- includes.h | +++ includes.h | @@ -171,6 +171,8 @@ | #include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */ | #endif | | +#include <netdb.h> /* For MAXHOSTNAMELEN */ | + | #include "defines.h" | | #include "platform.h" | _______________________________________________ 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> # define HOST_NAME_MAX MAXHOSTNAMELEN -# else -# define HOST_NAME_MAX 255 # endif #endif /* HOST_NAME_MAX */ ..... -- Tim Rice Multitalents (707) 456-1146 tim@xxxxxxxxxxxxxxxx _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev