blob: 84f4445e8da19f10b532cad13235b6f579513e9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
--- connman-1.31/src/iptables.c.old 2016-03-22 20:12:47.829460752 -0700
+++ connman-1.31/src/iptables.c 2016-03-22 21:33:36.835384724 -0700
@@ -28,11 +28,11 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/errno.h>
#include <sys/socket.h>
-#include <xtables.h>
+#include "connman_xtables.h"
#include <inttypes.h>
#include <linux/netfilter_ipv4/ip_tables.h>
#include "connman.h"
--- connman-1.31/src/firewall.c.old 2016-03-22 21:29:01.959472262 -0700
+++ connman-1.31/src/firewall.c 2016-03-22 21:33:53.048144181 -0700
@@ -23,11 +23,11 @@
#include <config.h>
#endif
#include <errno.h>
-#include <xtables.h>
+#include "connman_xtables.h"
#include <linux/netfilter_ipv4/ip_tables.h>
#include "connman.h"
#define CHAIN_PREFIX "connman-"
--- /dev/null 2016-03-18 06:21:16.372989086 -0700
+++ connman-1.31/include/connman_xtables.h 2016-03-22 21:32:21.349504786 -0700
@@ -0,0 +1,21 @@
+#ifndef CONNMAN_XTABLES_H
+#define CONNMAN_XTABLES_H
+
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) || \
+ LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
+#include <xtables.h>
+#else
+#ifdef __USE_MISC
+#define GENTOO_USE_MISC __USE_MISC
+#undef __USE_MISC
+#endif
+
+#include <xtables.h>
+
+#ifdef GENTOO_USE_MISC
+#define __USE_MISC GENTOO_USE_MISC
+#undef GENTOO_USE_MISC
+#endif
+#endif
+#endif
|