Hi, On Fri, Jul 09, 2010 at 10:31:02AM +0200, Gert Doering wrote: > the following patch fixes the IFF_MULTICAST compile-time problems on NetBSD, > and it should also fix them on OpenBSD (trac entry #17).
This would have been too easy... on NetBSD, <sys/socket.h> can be include before <sys/types.h> (which the original patch does), on OpenBSD, this fails. So I have swapped around these two includes in the <net/if.h> test program compiled by configure, and it now configure and compiles both on NetBSD and on OpenBSD just fine. (Last time I had no OpenBSD to test - in the mean time, I've setup an OpenBSD 4.7 VM and tested it myself, so I'm *sure* it works :-) ). Due to the fact that I've commited this in two goes, it's "two patches" now... I've appended both. Please apply to a clean configure.ac file, and to be sure, run "autoreconf" to rebuild "configure" (to Matthias: well, the magic might do this automatically, but before I get another bug report "your patch did not help" which could then be due to "autoreconf not run", I'll just make *sure* it was rebuilt). "David needs an independent ACK on this, so please test on NetBSD and OpenBSD and give feedback". gert ------------------------------------------------ From bc1a247c42afe51b027cb02acfab7cb1c986ce88 Mon Sep 17 00:00:00 2001 From: Gert Doering <g...@greenie.muc.de> List-Post: openvpn-devel@lists.sourceforge.net Date: Fri, 9 Jul 2010 10:24:46 +0200 Subject: [PATCH 1/2] Fix compile problems on NetBSD and OpenBSD - configure will not find <net/if.h> due to missing <sys/types.h> in the test program, and thus, tun.c will fail to compile with missing symbol IFF_MULTICAST. Signed-off-by: Gert Doering <g...@greenie.muc.de> --- configure.ac | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 4626e46..b91a41c 100644 --- a/configure.ac +++ b/configure.ac @@ -371,6 +371,9 @@ if test "${WIN32}" != "yes"; then [#ifdef HAVE_SYS_SOCKET_H # include <sys/socket.h> #endif + #ifdef HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif ]) AC_CHECK_HEADERS(netinet/ip.h,,, [#ifdef HAVE_SYS_TYPES_H -- 1.7.0.5 From 38e455b18f468b72e0357d49b0284a9372c7d9b2 Mon Sep 17 00:00:00 2001 From: Gert Doering <g...@greenie.muc.de> List-Post: openvpn-devel@lists.sourceforge.net Date: Sat, 10 Jul 2010 11:24:41 +0200 Subject: [PATCH 2/2] Fix <net/if.h> compile time problems on OpenBSD for good - previous fix fixed NetBSD but not OpenBSD (include <sys/socket.h> *after* <sys/types.h>) Signed-off-by: Gert Doering <g...@greenie.muc.de> --- configure.ac | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index b91a41c..3fb08ba 100644 --- a/configure.ac +++ b/configure.ac @@ -368,12 +368,12 @@ if test "${WIN32}" != "yes"; then linux/types.h sys/poll.h sys/epoll.h err.h dnl ) AC_CHECK_HEADERS(net/if.h,,, - [#ifdef HAVE_SYS_SOCKET_H - # include <sys/socket.h> - #endif - #ifdef HAVE_SYS_TYPES_H + [#ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif + #ifdef HAVE_SYS_SOCKET_H + # include <sys/socket.h> + #endif ]) AC_CHECK_HEADERS(netinet/ip.h,,, [#ifdef HAVE_SYS_TYPES_H -- 1.7.0.5 -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025 g...@net.informatik.tu-muenchen.de
pgple2sVuhFu3.pgp
Description: PGP signature