1 From 1466cbbdef835634366b2eb3a284fdff5833338c Mon Sep 17 00:00:00 2001
2 From: Romain Naour <romain.naour@gmail.com>
3 Date: Fri, 19 Aug 2016 23:30:06 +0200
4 Subject: [PATCH] dumpfile_tuntap: don't include linux/if_tun.h kernel header
6 dumpfile_tuntap.h mixes userspace and kernel headers.
8 As suggested in the musl wiki [1], remove the linux/include directives
9 and copy the required definitions.
11 [1] http://wiki.musl-libc.org/wiki/FAQ
13 Signed-off-by: Romain Naour <romain.naour@gmail.com>
15 dumpfile_tuntap.h | 17 +++++++++--------
16 1 file changed, 9 insertions(+), 8 deletions(-)
18 diff --git a/dumpfile_tuntap.h b/dumpfile_tuntap.h
19 index 37f50b6..8b23a2a 100644
20 --- a/dumpfile_tuntap.h
21 +++ b/dumpfile_tuntap.h
23 #include "packetchain.h"
27 -#include <linux/if_tun.h>
29 +/* TUNSETIFF ifr flags */
30 +#define IFF_TUN 0x0001
31 +#define IFF_TAP 0x0002
32 +#define IFF_NO_PI 0x1000
34 // Linux IEEE80211 link typ to set
35 #define LNX_LINKTYPE_80211 801
36 -// If the system headers don't have the TUNSETLINK ioctl, define it here,
37 -// and we'll figure it out at runtime
39 -#define TUNSETLINK _IOW('T', 205, int)
43 +#define TUNSETNOCSUM _IOW('T', 200, int)
44 +#define TUNSETIFF _IOW('T', 202, int)
45 +#define TUNSETLINK _IOW('T', 205, int)