From: Florian Fainelli Date: Fri, 8 Aug 2008 21:49:17 +0000 (+0000) Subject: package iproute2 has problems building on recent BSD-derived platforms because some... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e71cdf8127b31e8edbdfb6041a915fe2a7e8776d;p=openwrt%2Fstaging%2Fkaloz.git package iproute2 has problems building on recent BSD-derived platforms because some programs to be run on the host use malloc.h in an incompatible way. package/iproute2/patches/004-darwin_fixes.patch has a fix for Darwin, however the fix can be made to work on other BSD platforms by changing the patch as below. I think a similar approach should work for other BSD-derived platforms, replacing the #ifndef __APPLE__ with #if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(...) or perhaps even with just #ifdef __linux__ if the set of platforms where malloc.h is ok is small or restricted to just linux In any case, the patch is below. (#3869) Signed-off-by: Luigi Rizzo SVN-Revision: 12249 --- diff --git a/package/iproute2/patches/004-darwin_fixes.patch b/package/iproute2/patches/004-darwin_fixes.patch index 3719c7eba1..da7c3ec6db 100644 --- a/package/iproute2/patches/004-darwin_fixes.patch +++ b/package/iproute2/patches/004-darwin_fixes.patch @@ -6,7 +6,7 @@ Index: iproute-2.6.20-070313/netem/maketable.c #include #include #include -+#ifndef __APPLE__ ++#if !defined(__APPLE__) && !defined(__FreeBSD__) #include +#endif #include @@ -20,7 +20,7 @@ Index: iproute-2.6.20-070313/netem/normal.c #include #include -+#ifndef __APPLE__ ++#if !defined(__APPLE__) && !defined(__FreeBSD__) #include #include +#else @@ -37,7 +37,7 @@ Index: iproute-2.6.20-070313/netem/pareto.c #include #include -+#ifndef __APPLE__ ++#if !defined(__APPLE__) && !defined(__FreeBSD__) #include #include +#else @@ -54,7 +54,7 @@ Index: iproute-2.6.20-070313/netem/paretonormal.c #include #include #include -+#ifndef __APPLE__ ++#if !defined(__APPLE__) && !defined(__FreeBSD__) #include - #include