From: W.C.A. Wijngaards Date: Fri, 3 Dec 2021 09:44:47 +0000 (+0100) Subject: - Fix compile warning for if_nametoindex on windows 64bit. X-Git-Tag: release-1.15.0rc1~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4efbee08b5bf0587505ce89142c54087f68963ef;p=thirdparty%2Funbound.git - Fix compile warning for if_nametoindex on windows 64bit. --- diff --git a/config.h.in b/config.h.in index e8a26735d..197c2838b 100644 --- a/config.h.in +++ b/config.h.in @@ -381,6 +381,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_TCP_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NETIOAPI_H + /* Use libnettle for crypto */ #undef HAVE_NETTLE diff --git a/configure b/configure index 0e964568e..05dc8d2e7 100755 --- a/configure +++ b/configure @@ -14812,6 +14812,51 @@ fi done +for ac_header in netioapi.h +do : + ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default +#if HAVE_SYS_PARAM_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +#ifdef HAVE_SYS_UIO_H +#include +#endif + +#ifdef HAVE_NETINET_IN_H +#include +#endif + +#ifdef HAVE_NETINET_TCP_H +#include +#endif + +#ifdef HAVE_ARPA_INET_H +#include +#endif + +#ifdef HAVE_WINSOCK2_H +#include +#endif + +#ifdef HAVE_WS2TCPIP_H +#include +#endif + +" +if test "x$ac_cv_header_netioapi_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETIOAPI_H 1 +_ACEOF + +fi + +done + # check for types. # Using own tests for int64* because autoconf builtin only give 32bit. diff --git a/configure.ac b/configure.ac index 36fdb4598..20cb8c136 100644 --- a/configure.ac +++ b/configure.ac @@ -412,6 +412,39 @@ AC_CHECK_HEADERS([net/if.h],,, [ # Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH AC_CHECK_HEADERS([TargetConditionals.h],,, [AC_INCLUDES_DEFAULT]) +AC_CHECK_HEADERS([netioapi.h],,, [AC_INCLUDES_DEFAULT +#if HAVE_SYS_PARAM_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +#ifdef HAVE_SYS_UIO_H +#include +#endif + +#ifdef HAVE_NETINET_IN_H +#include +#endif + +#ifdef HAVE_NETINET_TCP_H +#include +#endif + +#ifdef HAVE_ARPA_INET_H +#include +#endif + +#ifdef HAVE_WINSOCK2_H +#include +#endif + +#ifdef HAVE_WS2TCPIP_H +#include +#endif +]) # check for types. # Using own tests for int64* because autoconf builtin only give 32bit. diff --git a/doc/Changelog b/doc/Changelog index 8aec7694f..98ff835b3 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +3 December 2021: Wouter + - Fix compile warning for if_nametoindex on windows 64bit. + 1 December 2021: Wouter - configure is set to 1.14.0, and release branch. - Fix doc/unbound.doxygen to remove obsolete tag warning. diff --git a/util/net_help.c b/util/net_help.c index d63fccd55..428e61bc4 100644 --- a/util/net_help.c +++ b/util/net_help.c @@ -44,6 +44,9 @@ #ifdef HAVE_NET_IF_H #include #endif +#ifdef HAVE_NETIOAPI_H +#include +#endif #include "util/net_help.h" #include "util/log.h" #include "util/data/dname.h"