]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix compile warning for if_nametoindex on windows 64bit.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 3 Dec 2021 09:44:47 +0000 (10:44 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 3 Dec 2021 09:44:47 +0000 (10:44 +0100)
config.h.in
configure
configure.ac
doc/Changelog
util/net_help.c

index e8a26735d2d3bbf210cb5814692a9ec4c995f22a..197c2838b33f333a424f5096f6bfc24c8c1f6185 100644 (file)
 /* Define to 1 if you have the <netinet/tcp.h> header file. */
 #undef HAVE_NETINET_TCP_H
 
+/* Define to 1 if you have the <netioapi.h> header file. */
+#undef HAVE_NETIOAPI_H
+
 /* Use libnettle for crypto */
 #undef HAVE_NETTLE
 
index 0e964568e2349ddb03dac72f229b2c83d5d94804..05dc8d2e769012701a06399bdf23d3b33ece6259 100755 (executable)
--- a/configure
+++ b/configure
 
 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 <sys/param.h>
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#ifdef HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#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.
index 36fdb4598c2751685c234416b713cbaae68fe7f2..20cb8c1368a32dca66e1734495e6ee0ed27fe9ae 100644 (file)
@@ -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 <sys/param.h>
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#ifdef HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+])
 
 # check for types.  
 # Using own tests for int64* because autoconf builtin only give 32bit.
index 8aec7694f42d3bd7ec6bda3a0f4420140f967860..98ff835b32c400c6a1a0136c840010b3f84b079e 100644 (file)
@@ -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.
index d63fccd55ca27cf99cd185af837d2781849c578c..428e61bc42fcbd61c07b19008a4b1a6a3cd8c923 100644 (file)
@@ -44,6 +44,9 @@
 #ifdef HAVE_NET_IF_H
 #include <net/if.h>
 #endif
+#ifdef HAVE_NETIOAPI_H
+#include <netioapi.h>
+#endif
 #include "util/net_help.h"
 #include "util/log.h"
 #include "util/data/dname.h"