logrotate: enable selinux support
[buildroot-gz.git] / package / kismet / 0005-dumpfile_tuntap-don-t-include-linux-if_tun.h-kernel-.patch
blobbe694345d285e1e1a13829fd37c6b38b3dbb3ab9
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>
14 ---
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
22 @@ -64,17 +64,18 @@
23 #include "packetchain.h"
24 #include "dumpfile.h"
26 -#ifdef SYS_LINUX
27 -#include <linux/if_tun.h>
28 +#ifdef SYS_LINUX
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
38 -#ifndef TUNSETLINK
39 -#define TUNSETLINK _IOW('T', 205, int)
40 -#endif
42 +/* Ioctl defines */
43 +#define TUNSETNOCSUM _IOW('T', 200, int)
44 +#define TUNSETIFF _IOW('T', 202, int)
45 +#define TUNSETLINK _IOW('T', 205, int)
46 #endif
48 struct ipc_dft_open {
49 --
50 2.5.5