diff options
author | Gert Doering | 2016-09-16 21:02:42 +0200 |
---|---|---|
committer | Gert Doering | 2016-09-17 12:24:02 +0200 |
commit | 7efa60d9790e029b8f9efd6a0ca06312d31d3420 (patch) | |
tree | 99033989b5d2cd98ed3e24218688986bbb2f073a /configure.ac | |
parent | a85ba0e06badf9932e80deb53b68f50611943c6e (diff) | |
download | openvpn-7efa60d9790e029b8f9efd6a0ca06312d31d3420.zip openvpn-7efa60d9790e029b8f9efd6a0ca06312d31d3420.tar.gz |
Fix IP_PKTINFO related compilation failure on NetBSD 7.0
NetBSD has introduced IP_PKTINFO and struct in_pktinfo, but does not
have the "ipi_spec_dst" structure element, causing compilation errors.
Introduce a check for that (AC_CHECK_MEMBER) in configure.ac, and
change all "#ifdef HAVE_IN_PKTINFO" to also check "HAVE_IPI_SPEC_DST".
Patch inspired by NetBSD pkgsrc patch set.
(Note: with that patch, OpenVPN --multihome is still broken for IPv4
on NetBSD 7.0.1 / amd64, but that's a different issue)
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20160916190242.44897-1-gert@greenie.muc.de>
URL: http://www.mail-archive.com/search?l=mid&q=20160916190242.44897-1-gert@greenie.muc.de
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index f21c37a..2d578f4 100644 --- a/configure.ac +++ b/configure.ac @@ -455,6 +455,9 @@ SOCKET_INCLUDES=" #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif +#ifdef HAVE_NET_IF_H +#include <net/if.h> +#endif #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> #endif @@ -524,6 +527,12 @@ AC_CHECK_TYPE( , [[${SOCKET_INCLUDES}]] ) +AC_CHECK_MEMBER( + [struct in_pktinfo.ipi_spec_dst], + [AC_DEFINE([HAVE_IPI_SPEC_DST], [1], [struct in_pktinfo.ipi_spec_dst needed for IP_PKTINFO support])], + , + [[${SOCKET_INCLUDES}]] +) AC_CHECK_TYPE( [struct sockaddr_in6], , |