summaryrefslogtreecommitdiff
path: root/package/iproute2
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-04-05 05:36:10 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-04-05 05:36:10 +0200
commit247861e494c03f9c0438ea3979110efbe405d98d (patch)
tree112d6da1ff4c204819eeeee8f6aa85d58fb14522 /package/iproute2
parentb12b9cd0f763e7d67a2b78f136b682d54b6b75ab (diff)
fix iproute2 musl compile
Diffstat (limited to 'package/iproute2')
-rw-r--r--package/iproute2/Makefile2
-rw-r--r--package/iproute2/patches/patch-include_iptables_common_h25
-rw-r--r--package/iproute2/patches/patch-include_iptables_h38
-rw-r--r--package/iproute2/patches/patch-include_libiptc_ipt_kernel_headers_h25
4 files changed, 89 insertions, 1 deletions
diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile
index a20bfd0a6..0257e3909 100644
--- a/package/iproute2/Makefile
+++ b/package/iproute2/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= iproute2
PKG_VERSION:= 3.12.0
-PKG_RELEASE:= 2
+PKG_RELEASE:= 3
PKG_MD5SUM:= f87386aaaecafab95607fd10e8152c68
PKG_DESCR:= iproute2 routing control utility
PKG_SECTION:= route
diff --git a/package/iproute2/patches/patch-include_iptables_common_h b/package/iproute2/patches/patch-include_iptables_common_h
new file mode 100644
index 000000000..d0ca2c0a2
--- /dev/null
+++ b/package/iproute2/patches/patch-include_iptables_common_h
@@ -0,0 +1,25 @@
+--- iproute2-3.12.0.orig/include/iptables_common.h 2013-11-23 02:10:33.000000000 +0100
++++ iproute2-3.12.0/include/iptables_common.h 2014-04-05 05:21:46.946376336 +0200
+@@ -1,5 +1,8 @@
+ #ifndef _IPTABLES_COMMON_H
+ #define _IPTABLES_COMMON_H
++
++#include <stdint.h>
++
+ /* Shared definitions between ipv4 and ipv6. */
+
+ enum exittype {
+@@ -43,9 +46,9 @@ extern char *lib_dir;
+ extern void init_extensions(void);
+ #endif
+
+-#define __be32 u_int32_t
+-#define __le32 u_int32_t
+-#define __be16 u_int16_t
+-#define __le16 u_int16_t
++#define __be32 uint32_t
++#define __le32 uint32_t
++#define __be16 uint16_t
++#define __le16 uint16_t
+
+ #endif /*_IPTABLES_COMMON_H*/
diff --git a/package/iproute2/patches/patch-include_iptables_h b/package/iproute2/patches/patch-include_iptables_h
new file mode 100644
index 000000000..ca5f11b3e
--- /dev/null
+++ b/package/iproute2/patches/patch-include_iptables_h
@@ -0,0 +1,38 @@
+--- iproute2-3.12.0.orig/include/iptables.h 2013-11-23 02:10:33.000000000 +0100
++++ iproute2-3.12.0/include/iptables.h 2014-04-05 05:22:26.690501973 +0200
+@@ -20,7 +20,7 @@ struct ipt_get_revision
+ {
+ char name[IPT_FUNCTION_MAXNAMELEN-1];
+
+- u_int8_t revision;
++ uint8_t revision;
+ };
+ #endif /* IPT_SO_GET_REVISION_MATCH Old kernel source */
+
+@@ -39,7 +39,7 @@ struct iptables_match
+ ipt_chainlabel name;
+
+ /* Revision of match (0 by default). */
+- u_int8_t revision;
++ uint8_t revision;
+
+ const char *version;
+
+@@ -92,7 +92,7 @@ struct iptables_target
+ ipt_chainlabel name;
+
+ /* Revision of target (0 by default). */
+- u_int8_t revision;
++ uint8_t revision;
+
+ const char *version;
+
+@@ -153,7 +153,7 @@ extern char *mask_to_dotted(const struct
+
+ extern void parse_hostnetworkmask(const char *name, struct in_addr **addrpp,
+ struct in_addr *maskp, unsigned int *naddrs);
+-extern u_int16_t parse_protocol(const char *s);
++extern uint16_t parse_protocol(const char *s);
+
+ extern int do_command(int argc, char *argv[], char **table,
+ iptc_handle_t *handle);
diff --git a/package/iproute2/patches/patch-include_libiptc_ipt_kernel_headers_h b/package/iproute2/patches/patch-include_libiptc_ipt_kernel_headers_h
new file mode 100644
index 000000000..bc836c0d1
--- /dev/null
+++ b/package/iproute2/patches/patch-include_libiptc_ipt_kernel_headers_h
@@ -0,0 +1,25 @@
+--- iproute2-3.12.0.orig/include/libiptc/ipt_kernel_headers.h 2013-11-23 02:10:33.000000000 +0100
++++ iproute2-3.12.0/include/libiptc/ipt_kernel_headers.h 2014-04-05 05:25:40.983670487 +0200
+@@ -5,22 +5,10 @@
+
+ #include <limits.h>
+
+-#if defined(__GLIBC__) && __GLIBC__ == 2
+ #include <netinet/ip.h>
+ #include <netinet/in.h>
+ #include <netinet/ip_icmp.h>
+ #include <netinet/tcp.h>
+ #include <netinet/udp.h>
+ #include <sys/types.h>
+-#else /* libc5 */
+-#include <sys/socket.h>
+-#include <linux/ip.h>
+-#include <linux/in.h>
+-#include <linux/if.h>
+-#include <linux/icmp.h>
+-#include <linux/tcp.h>
+-#include <linux/udp.h>
+-#include <linux/types.h>
+-#include <linux/in6.h>
+-#endif
+ #endif