Ticket #17: patch2.txt

File patch2.txt, 1.9 KB (added by Gert Döring, 14 years ago)

second patch to configure.ac - contains the first patch as well, apply to pristine sources

Line 
1From bc1a247c42afe51b027cb02acfab7cb1c986ce88 Mon Sep 17 00:00:00 2001
2From: Gert Doering <gert@greenie.muc.de>
3Date: Fri, 9 Jul 2010 10:24:46 +0200
4Subject: [PATCH 1/2] Fix compile problems on NetBSD and OpenBSD - configure will not find
5 <net/if.h> due to missing <sys/types.h> in the test program, and thus,
6 tun.c will fail to compile with missing symbol IFF_MULTICAST.
7
8Signed-off-by: Gert Doering <gert@greenie.muc.de>
9---
10 configure.ac |    3 +++
11 1 files changed, 3 insertions(+), 0 deletions(-)
12
13diff --git a/configure.ac b/configure.ac
14index 4626e46..b91a41c 100644
15--- a/configure.ac
16+++ b/configure.ac
17@@ -371,6 +371,9 @@ if test "${WIN32}" != "yes"; then
18                 [#ifdef HAVE_SYS_SOCKET_H
19                  # include <sys/socket.h>
20                  #endif
21+                 #ifdef HAVE_SYS_TYPES_H
22+                 # include <sys/types.h>
23+                 #endif
24                 ])
25    AC_CHECK_HEADERS(netinet/ip.h,,,
26                 [#ifdef HAVE_SYS_TYPES_H
27--
281.7.0.5
29
30
31From 38e455b18f468b72e0357d49b0284a9372c7d9b2 Mon Sep 17 00:00:00 2001
32From: Gert Doering <gert@greenie.muc.de>
33Date: Sat, 10 Jul 2010 11:24:41 +0200
34Subject: [PATCH 2/2] Fix <net/if.h> compile time problems on OpenBSD for good - previous fix
35 fixed NetBSD but not OpenBSD (include <sys/socket.h> *after* <sys/types.h>)
36
37Signed-off-by: Gert Doering <gert@greenie.muc.de>
38---
39 configure.ac |    8 ++++----
40 1 files changed, 4 insertions(+), 4 deletions(-)
41
42diff --git a/configure.ac b/configure.ac
43index b91a41c..3fb08ba 100644
44--- a/configure.ac
45+++ b/configure.ac
46@@ -368,12 +368,12 @@ if test "${WIN32}" != "yes"; then
47                 linux/types.h sys/poll.h sys/epoll.h err.h dnl
48    )
49    AC_CHECK_HEADERS(net/if.h,,,
50-                [#ifdef HAVE_SYS_SOCKET_H
51-                 # include <sys/socket.h>
52-                 #endif
53-                 #ifdef HAVE_SYS_TYPES_H
54+                [#ifdef HAVE_SYS_TYPES_H
55                  # include <sys/types.h>
56                  #endif
57+                 #ifdef HAVE_SYS_SOCKET_H
58+                 # include <sys/socket.h>
59+                 #endif
60                 ])
61    AC_CHECK_HEADERS(netinet/ip.h,,,
62                 [#ifdef HAVE_SYS_TYPES_H
63--
641.7.0.5
65