INN commit: trunk (include/portable/socket.h lib/network.c)

INN Commit Russ_Allbery at isc.org
Mon Oct 27 07:04:27 UTC 2008


    Date: Monday, October 27, 2008 @ 00:04:27
  Author: iulius
Revision: 8150

Revert the change of previous revision 8145.
Add a portable declaration instead.

Modified:
  trunk/include/portable/socket.h
  trunk/lib/network.c

---------------------------+
 include/portable/socket.h |    6 ++++++
 lib/network.c             |    2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

Modified: include/portable/socket.h
===================================================================
--- include/portable/socket.h	2008-10-25 23:26:12 UTC (rev 8149)
+++ include/portable/socket.h	2008-10-27 07:04:27 UTC (rev 8150)
@@ -156,6 +156,12 @@
 # define EAFNOSUPPORT EDOM
 #endif
 
+/* EAI_ADDRFAMILY was made obsolete by RFC 3493, but it may still be
+ * used by obsolete IPv6 stacks. */
+#ifndef EAI_ADDRFAMILY
+# define EAI_ADDRFAMILY EAI_FAMILY
+#endif
+
 END_DECLS
 
 #endif /* PORTABLE_SOCKET_H */

Modified: lib/network.c
===================================================================
--- lib/network.c	2008-10-25 23:26:12 UTC (rev 8149)
+++ lib/network.c	2008-10-27 07:04:27 UTC (rev 8150)
@@ -332,7 +332,7 @@
     error = getaddrinfo(NULL, service, &hints, &addrs);
     if (error < 0) {
 #ifdef IPV6_V6ONLY
-        if (error != EAI_FAMILY)
+        if (error != EAI_ADDRFAMILY && error != EAI_FAMILY)
 #endif
             warn("getaddrinfo failed: %s", gai_strerror(error));
         return;



More information about the inn-committers mailing list