deal with systems missing in6addr_any

This commit is contained in:
Bob Halley
2000-03-22 22:07:17 +00:00
parent b67a66514e
commit 435532822d
4 changed files with 30 additions and 1 deletions
+12 -1
View File
@@ -13,7 +13,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
AC_REVISION($Revision: 1.105 $)
AC_REVISION($Revision: 1.106 $)
AC_PREREQ(2.13)
@@ -580,6 +580,16 @@ case "$found_ipv6" in
yes)
ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1"
AC_MSG_CHECKING(for in6addr_any)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>],
[struct in6_addr in6; in6 = in6addr_any; return (0);],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"],
[AC_MSG_RESULT(no)
ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"])
;;
no)
ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
@@ -593,6 +603,7 @@ esac
AC_SUBST(ISC_PLATFORM_HAVEIPV6)
AC_SUBST(LWRES_PLATFORM_HAVEIPV6)
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
AC_SUBST(ISC_IPV6_H)
AC_SUBST(ISC_IPV6_O)
AC_SUBST(ISC_ISCIPV6_O)
+6
View File
@@ -43,6 +43,12 @@
*/
@ISC_PLATFORM_HAVEIPV6@
/*
* If this system is missing in6addr_any, ISC_PLATFORM_NEEDIN6ADDRANY will
* be defined.
*/
@ISC_PLATFORM_NEEDIN6ADDRANY@
/*
* If this system needs inet_ntop(), ISC_PLATFORM_NEEDNTOP will be defined.
*/
+8
View File
@@ -89,6 +89,14 @@
#include <isc/ipv6.h>
#endif
/*
* Cope with a missing in6addr_any.
*/
#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
extern const struct in6_addr isc_net_in6addrany;
#define in6addr_any isc_net_in6addrany
#endif
/*
* Ensure type in_port_t is defined.
*/
+4
View File
@@ -26,6 +26,10 @@
#include <isc/net.h>
#include <isc/once.h>
#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
const struct in6_addr isc_net_in6addrany = IN6ADDR_ANY_INIT;
#endif
static isc_once_t once = ISC_ONCE_INIT;
static isc_result_t ipv4_result = ISC_R_NOTFOUND;
static isc_result_t ipv6_result = ISC_R_NOTFOUND;