Commit 9f6c66e1 authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

Deal with AIX defining in6addr_any but not in6addr_loopback

in libc, even though both are declared in <netinet/in.h>.  This caused
named to fail to link on AIX after change 1083, which introduced
the first actual use of in6addr_loopback.
parent 64e9b7ea
......@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.307 $)
AC_REVISION($Revision: 1.308 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
......@@ -1048,6 +1048,23 @@ $isc_in_addr6_hack
ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
LWRES_PLATFORM_NEEDIN6ADDRANY="#define LWRES_PLATFORM_NEEDIN6ADDRANY 1"])
AC_MSG_CHECKING(for in6addr_loopback)
AC_TRY_LINK([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
$isc_netinetin6_hack
$isc_netinet6in6_hack
$isc_in_addr6_hack
],
[struct in6_addr in6; in6 = in6addr_loopback; return (0);],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"
LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK"],
[AC_MSG_RESULT(no)
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"
LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#define LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK 1"])
AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
AC_TRY_COMPILE([
#include <sys/types.h>
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: platform.h.in,v 1.26 2001/10/22 04:01:29 marka Exp $ */
/* $Id: platform.h.in,v 1.27 2001/11/01 22:39:27 gson Exp $ */
#ifndef ISC_PLATFORM_H
#define ISC_PLATFORM_H 1
......@@ -58,6 +58,12 @@
*/
@ISC_PLATFORM_NEEDIN6ADDRANY@
/*
* If this system is missing in6addr_loopback, ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
* will be defined.
*/
@ISC_PLATFORM_NEEDIN6ADDRLOOPBACK@
/*
* If this system has in6_pktinfo, ISC_PLATFORM_HAVEIN6PKTINFO will be
* defined.
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: net.h,v 1.31 2001/07/16 03:06:53 marka Exp $ */
/* $Id: net.h,v 1.32 2001/11/01 22:39:29 gson Exp $ */
#ifndef ISC_NET_H
#define ISC_NET_H 1
......@@ -167,6 +167,9 @@ struct in6_pktinfo {
#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
extern const struct in6_addr isc_net_in6addrany;
#define in6addr_any isc_net_in6addrany
#endif
#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
extern const struct in6_addr isc_net_in6addrloop;
#define in6addr_loopback isc_net_in6addrloop
#endif
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: platform.h.in,v 1.12 2001/07/18 08:15:23 marka Exp $ */
/* $Id: platform.h.in,v 1.13 2001/11/01 22:39:30 gson Exp $ */
#ifndef LWRES_PLATFORM_H
#define LWRES_PLATFORM_H 1
......@@ -56,6 +56,12 @@
*/
@LWRES_PLATFORM_NEEDIN6ADDRANY@
/*
* If this system is missing in6addr_loopback,
* LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK will be defined.
*/
@LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK@
/*
* If this system has in_addr6, rather than in6_addr,
* LWRES_PLATFORM_HAVEINADDR6 will be defined.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment