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.
cheers
luigi
Index: package/iproute2/patches/004-darwin_fixes.patch
===================================================================
--- package/iproute2/patches/004-darwin_fixes.patch (revision 12201)
+++ package/iproute2/patches/004-darwin_fixes.patch (working copy)
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-+#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__)
#include <malloc.h>
+#endif
#include <string.h>
@@ -20,7 +20,7 @@
#include <string.h>
#include <limits.h>
-+#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__)
#include <linux/types.h>
#include <linux/pkt_sched.h>
+#else
@@ -37,7 +37,7 @@
#include <math.h>
#include <limits.h>
-+#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__)
#include <linux/types.h>
#include <linux/pkt_sched.h>
+#else
@@ -54,7 +54,7 @@
#include <string.h>
#include <math.h>
#include <limits.h>
-+#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__)
#include <malloc.h>
-
#include <linux/types.h>
_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel