summaryrefslogtreecommitdiff
path: root/package/iproute2
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-12-11 17:00:39 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2009-12-11 17:00:39 +0100
commit5de4c2949b50992dd7c5063835301e5ff18e66cb (patch)
treeba5ee2fa165c196305264d4cd9dae7f70a5a081a /package/iproute2
parent83270395db5c6e016076f0ea593594b057778e05 (diff)
make iproute compilable on FreeBSD host
make an extra linux-headers dir in STAGING_DIR for special cases, where host gcc is used, but kernel headers from Linux are needed. Move GNU make specific export to GNUMakefile.
Diffstat (limited to 'package/iproute2')
-rw-r--r--package/iproute2/Makefile3
-rw-r--r--package/iproute2/patches/patch-netem_Makefile27
-rw-r--r--package/iproute2/patches/patch-netem_maketable_c11
-rw-r--r--package/iproute2/patches/patch-netem_normal_c10
-rw-r--r--package/iproute2/patches/patch-netem_paretonormal_c14
5 files changed, 64 insertions, 1 deletions
diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile
index 6dcc3947a..feae51b1c 100644
--- a/package/iproute2/Makefile
+++ b/package/iproute2/Makefile
@@ -36,7 +36,8 @@ $(eval $(call PKG_template,RTMON,rtmon,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPEN
$(eval $(call PKG_template,SS,ss,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_SS},${PKG_DESCR_SS},${PKG_SECTION}))
TCFLAGS+= -D_GNU_SOURCE
-XAKE_FLAGS+= CCOPTS="${TCFLAGS}" MFLAGS="CC=${TARGET_CC}"
+XAKE_FLAGS+= CCOPTS="${TCFLAGS}" MFLAGS="CC=${TARGET_CC}" \
+ HOSTCFLAGS="-I${LINUX_HEADER_DIR}/include"
CONFIGURE_STYLE:= gnu
CONFIGURE_FLAGS+= KERNEL_INCLUDE="${LINUX_DIR}/include"
diff --git a/package/iproute2/patches/patch-netem_Makefile b/package/iproute2/patches/patch-netem_Makefile
new file mode 100644
index 000000000..325d01925
--- /dev/null
+++ b/package/iproute2/patches/patch-netem_Makefile
@@ -0,0 +1,27 @@
+--- iproute2-2.6.29-1.orig/netem/Makefile 2009-03-24 23:40:54.000000000 +0100
++++ iproute2-2.6.29-1/netem/Makefile 2009-12-11 16:39:15.000000000 +0100
+@@ -2,13 +2,13 @@ DISTGEN = maketable normal pareto pareto
+ DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
+
+ HOSTCC ?= $(CC)
+-CCOPTS = $(CBUILD_CFLAGS)
++HOSTCFLAGS ?=
+ LDLIBS += -lm
+
+ all: $(DISTGEN) $(DISTDATA)
+
+ $(DISTGEN):
+- $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
++ $(HOSTCC) $(HOSTCFLAGS) -I../include -o $@ $@.c -lm
+
+ %.dist: %
+ ./$* > $@
+@@ -17,7 +17,7 @@ experimental.dist: maketable experimenta
+ ./maketable experimental.dat > experimental.dist
+
+ stats: stats.c
+- $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
++ $(HOSTCC) $(HOSTCFLAGS) -I../include -o $@ $@.c -lm
+
+ install: all
+ mkdir -p $(DESTDIR)/lib/tc
diff --git a/package/iproute2/patches/patch-netem_maketable_c b/package/iproute2/patches/patch-netem_maketable_c
new file mode 100644
index 000000000..b6eb03405
--- /dev/null
+++ b/package/iproute2/patches/patch-netem_maketable_c
@@ -0,0 +1,11 @@
+--- iproute2-2.6.29-1.orig/netem/maketable.c 2009-03-24 23:40:54.000000000 +0100
++++ iproute2-2.6.29-1/netem/maketable.c 2009-12-11 16:32:33.000000000 +0100
+@@ -10,7 +10,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
diff --git a/package/iproute2/patches/patch-netem_normal_c b/package/iproute2/patches/patch-netem_normal_c
new file mode 100644
index 000000000..719899301
--- /dev/null
+++ b/package/iproute2/patches/patch-netem_normal_c
@@ -0,0 +1,10 @@
+--- iproute2-2.6.29-1.orig/netem/normal.c 2009-03-24 23:40:54.000000000 +0100
++++ iproute2-2.6.29-1/netem/normal.c 2009-12-11 16:35:38.000000000 +0100
+@@ -8,7 +8,6 @@
+ #include <string.h>
+ #include <limits.h>
+
+-#include <linux/types.h>
+ #include <linux/pkt_sched.h>
+
+ #define TABLESIZE 16384
diff --git a/package/iproute2/patches/patch-netem_paretonormal_c b/package/iproute2/patches/patch-netem_paretonormal_c
new file mode 100644
index 000000000..d2c2ac4b6
--- /dev/null
+++ b/package/iproute2/patches/patch-netem_paretonormal_c
@@ -0,0 +1,14 @@
+--- iproute2-2.6.29-1.orig/netem/paretonormal.c 2009-03-24 23:40:54.000000000 +0100
++++ iproute2-2.6.29-1/netem/paretonormal.c 2009-12-11 16:59:02.000000000 +0100
+@@ -11,11 +11,9 @@
+ */
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
+ #include <limits.h>
+-#include <malloc.h>
+
+ #include <linux/types.h>
+ #include <linux/pkt_sched.h>