xorg-server: not available with musl on ARM
[buildroot-gz.git] / package / vpnc / 0008-sysdep.c-don-t-include-linux-if_tun.h-on-Linux.patch
bloba4cfe11b35b150cc1be9423e88ccc8e8e5873ad3
1 From 2e2eab070384834036c1458c669070ed17d81dbe Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Wed, 10 Feb 2016 23:15:36 +0100
4 Subject: [PATCH] sysdep.c: don't include <linux/if_tun.h> on Linux
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Including <linux/if_tun.h> in sysdep.c is not necessary since sysdep.h
10 already includes <netinet/if_ether.h>. And this is actually
11 potentially harmful since both files redefine the same 'struct
12 ethhdr', causing the following build failure with the musl C library:
14 In file included from sysdep.h:28:0,
15 from sysdep.c:71:
16 .../buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/netinet/if_ether.h:96:8: error: redefinition of ‘struct ethhdr’
17 struct ethhdr {
19 In file included from .../buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/linux/if_tun.h:20:0,
20 from sysdep.c:62:
21 .../buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/linux/if_ether.h:138:8: note: originally defined here
22 struct ethhdr {
25 Original patch from:
26 http://git.alpinelinux.org/cgit/aports/tree/testing/vpnc/working.patch
28 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
29 ---
30 sysdep.c | 4 +---
31 1 file changed, 1 insertion(+), 3 deletions(-)
33 diff --git a/sysdep.c b/sysdep.c
34 index d8f181d..f83543d 100644
35 --- a/sysdep.c
36 +++ b/sysdep.c
37 @@ -58,13 +58,11 @@
39 #if defined(__DragonFly__)
40 #include <net/tun/if_tun.h>
41 -#elif defined(__linux__)
42 -#include <linux/if_tun.h>
43 #elif defined(__APPLE__)
44 /* no header for tun */
45 #elif defined(__CYGWIN__)
46 #include "tap-win32.h"
47 -#else
48 +#elif !defined(__linux__)
49 #include <net/if_tun.h>
50 #endif
52 --
53 2.6.4