summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch')
-rw-r--r--meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch69
1 files changed, 13 insertions, 56 deletions
diff --git a/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch b/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
index 7a003d912f..f1f85a6fa0 100644
--- a/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
+++ b/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
@@ -1,81 +1,41 @@
1From 7c07b7fd4fdd7844dd032af822306f08e4422c34 Mon Sep 17 00:00:00 2001 1[PATCH] fix build with musl
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 6 Apr 2015 20:47:29 -0700
4Subject: [PATCH] fix build with musl
5 2
6Add needed headers they are just not needed for glibc6+ but also
7for musl
8Define additional TCOPTS if not there 3Define additional TCOPTS if not there
9
10u_initX types are in sys/types.h be explicit about it 4u_initX types are in sys/types.h be explicit about it
11 5
12Upstream-Status: Pending 6Upstream-Status: Pending
13 7
14Signed-off-by: Khem Raj <raj.khem@gmail.com> 8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9Signed-off-by: Maxin B. John <maxin.john@intel.com>
15--- 10---
16 extensions/libxt_TCPOPTSTRIP.c | 15 +++++++++++++++ 11diff -Naur iptables-1.6.0-origin/extensions/libxt_TCPOPTSTRIP.c iptables-1.6.0/extensions/libxt_TCPOPTSTRIP.c
17 include/libiptc/ipt_kernel_headers.h | 12 ------------ 12--- iptables-1.6.0-origin/extensions/libxt_TCPOPTSTRIP.c 2015-12-09 14:55:06.000000000 +0200
18 include/linux/netfilter_ipv4/ip_tables.h | 1 + 13+++ iptables-1.6.0/extensions/libxt_TCPOPTSTRIP.c 2015-12-29 14:44:32.585327077 +0200
19 3 files changed, 16 insertions(+), 12 deletions(-)
20
21diff --git a/extensions/libxt_TCPOPTSTRIP.c b/extensions/libxt_TCPOPTSTRIP.c
22index 6897857..8a170b2 100644
23--- a/extensions/libxt_TCPOPTSTRIP.c
24+++ b/extensions/libxt_TCPOPTSTRIP.c
25@@ -12,6 +12,21 @@ 14@@ -12,6 +12,21 @@
26 #ifndef TCPOPT_MD5SIG 15 #ifndef TCPOPT_MD5SIG
27 # define TCPOPT_MD5SIG 19 16 # define TCPOPT_MD5SIG 19
28 #endif 17 #endif
29+#ifndef TCPOPT_MAXSEG 18+#ifndef TCPOPT_MAXSEG
30+# define TCPOPT_MAXSEG 2 19+#define TCPOPT_MAXSEG 2
31+#endif 20+#endif
32+#ifndef TCPOPT_WINDOW 21+#ifndef TCPOPT_WINDOW
33+# define TCPOPT_WINDOW 3 22+#define TCPOPT_WINDOW 3
34+#endif 23+#endif
35+#ifndef TCPOPT_SACK_PERMITTED 24+#ifndef TCPOPT_SACK_PERMITTED
36+# define TCPOPT_SACK_PERMITTED 4 25+#define TCPOPT_SACK_PERMITTED 4
37+#endif 26+#endif
38+#ifndef TCPOPT_SACK 27+#ifndef TCPOPT_SACK
39+# define TCPOPT_SACK 5 28+#define TCPOPT_SACK 5
40+#endif 29+#endif
41+#ifndef TCPOPT_TIMESTAMP 30+#ifndef TCPOPT_TIMESTAMP
42+# define TCPOPT_TIMESTAMP 8 31+#define TCPOPT_TIMESTAMP 8
43+#endif 32+#endif
44 33
45 enum { 34 enum {
46 O_STRIP_OPTION = 0, 35 O_STRIP_OPTION = 0,
47diff --git a/include/libiptc/ipt_kernel_headers.h b/include/libiptc/ipt_kernel_headers.h 36diff -Naur iptables-1.6.0-origin/include/linux/netfilter_ipv4/ip_tables.h iptables-1.6.0/include/linux/netfilter_ipv4/ip_tables.h
48index 18861fe..a5963e9 100644 37--- iptables-1.6.0-origin/include/linux/netfilter_ipv4/ip_tables.h 2015-12-09 14:55:06.000000000 +0200
49--- a/include/libiptc/ipt_kernel_headers.h 38+++ iptables-1.6.0/include/linux/netfilter_ipv4/ip_tables.h 2015-12-29 14:40:21.250469195 +0200
50+++ b/include/libiptc/ipt_kernel_headers.h
51@@ -5,7 +5,6 @@
52
53 #include <limits.h>
54
55-#if defined(__GLIBC__) && __GLIBC__ == 2
56 #include <netinet/ip.h>
57 #include <netinet/in.h>
58 #include <netinet/ip_icmp.h>
59@@ -13,15 +12,4 @@
60 #include <netinet/udp.h>
61 #include <net/if.h>
62 #include <sys/types.h>
63-#else /* libc5 */
64-#include <sys/socket.h>
65-#include <linux/ip.h>
66-#include <linux/in.h>
67-#include <linux/if.h>
68-#include <linux/icmp.h>
69-#include <linux/tcp.h>
70-#include <linux/udp.h>
71-#include <linux/types.h>
72-#include <linux/in6.h>
73-#endif
74 #endif
75diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
76index 57fd82a..4807246 100644
77--- a/include/linux/netfilter_ipv4/ip_tables.h
78+++ b/include/linux/netfilter_ipv4/ip_tables.h
79@@ -15,6 +15,7 @@ 39@@ -15,6 +15,7 @@
80 #ifndef _IPTABLES_H 40 #ifndef _IPTABLES_H
81 #define _IPTABLES_H 41 #define _IPTABLES_H
@@ -84,6 +44,3 @@ index 57fd82a..4807246 100644
84 #include <linux/types.h> 44 #include <linux/types.h>
85 45
86 #include <linux/netfilter_ipv4.h> 46 #include <linux/netfilter_ipv4.h>
87--
882.1.4
89