Changeset 12249


Ignore:
Timestamp:
2008-08-08T23:49:17+02:00 (9 years ago)
Author:
florian
Message:

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 <rizzo@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/iproute2/patches/004-darwin_fixes.patch

    r7540 r12249  
    77 #include <stdlib.h> 
    88 #include <math.h> 
    9 +#ifndef __APPLE__ 
     9+#if !defined(__APPLE__) && !defined(__FreeBSD__) 
    1010 #include <malloc.h> 
    1111+#endif 
     
    2121 #include <limits.h> 
    2222  
    23 +#ifndef __APPLE__ 
     23+#if !defined(__APPLE__) && !defined(__FreeBSD__) 
    2424 #include <linux/types.h> 
    2525 #include <linux/pkt_sched.h> 
     
    3838 #include <limits.h> 
    3939  
    40 +#ifndef __APPLE__ 
     40+#if !defined(__APPLE__) && !defined(__FreeBSD__) 
    4141 #include <linux/types.h> 
    4242 #include <linux/pkt_sched.h> 
     
    5555 #include <math.h> 
    5656 #include <limits.h> 
    57 +#ifndef __APPLE__ 
     57+#if !defined(__APPLE__) && !defined(__FreeBSD__) 
    5858 #include <malloc.h> 
    5959- 
Note: See TracChangeset for help on using the changeset viewer.