[openssh-commits] [openssh] 01/01: Add null declaration of AI_NUMERICINFO.

git+noreply at mindrot.org git+noreply at mindrot.org
Sat Feb 21 15:13:48 AEDT 2015


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

dtucker pushed a commit to branch master
in repository openssh.

commit e50e8c97a9cecae1f28febccaa6ca5ab3bc10f54
Author: Darren Tucker <dtucker at zip.com.au>
Date:   Sat Feb 21 15:10:33 2015 +1100

    Add null declaration of AI_NUMERICINFO.
    
    Some platforms (older FreeBSD and DragonFly versions) do have
    getaddrinfo() but do not have AI_NUMERICINFO. so define it to zero
    in those cases.
---
 configure.ac | 7 +++++++
 defines.h    | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/configure.ac b/configure.ac
index cb66f54..2ef9db6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2197,6 +2197,13 @@ if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
 	)
 fi
 
+if test "x$ac_cv_func_getaddrinfo" = "xyes"; then
+	AC_CHECK_DECLS(AI_NUMERICSERV, , ,
+	    [#include <sys/types.h>
+	     #include <sys/socket.h>
+	     #include <netdb.h>])
+fi
+
 if test "x$check_for_conflicting_getspnam" = "x1"; then
 	AC_MSG_CHECKING([for conflicting getspnam in shadow.h])
 	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <shadow.h> ]],
diff --git a/defines.h b/defines.h
index f489196..1ec9467 100644
--- a/defines.h
+++ b/defines.h
@@ -594,6 +594,10 @@ struct winsize {
 # undef HAVE_GAI_STRERROR
 #endif
 
+#if defined(HAVE_GETADDRINFO) && !defined(HAVE_DECL_AI_NUMERICSERV)
+# define AI_NUMERICSERV	0
+#endif
+
 #if defined(BROKEN_UPDWTMPX) && defined(HAVE_UPDWTMPX)
 # undef HAVE_UPDWTMPX
 #endif

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


More information about the openssh-commits mailing list