Browse Source

fix cross-compile on Darwin

Waldemar Brodkorb 11 years ago
parent
commit
0652f944af

+ 8 - 5
package/iproute2/patches/patch-netem_normal_c

@@ -1,10 +1,13 @@
---- 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 @@
+--- iproute2-3.12.0.orig/netem/normal.c	2013-11-23 02:10:33.000000000 +0100
++++ iproute2-3.12.0/netem/normal.c	2014-02-09 11:40:30.000000000 +0100
+@@ -8,9 +8,7 @@
  #include <string.h>
  #include <limits.h>
  
 -#include <linux/types.h>
- #include <linux/pkt_sched.h>
- 
+-#include <linux/pkt_sched.h>
+-
++#define NETEM_DIST_SCALE	8192
  #define TABLESIZE 16384
+ #define TABLEFACTOR NETEM_DIST_SCALE
+ 

+ 14 - 0
package/iproute2/patches/patch-netem_pareto_c

@@ -0,0 +1,14 @@
+--- iproute2-3.12.0.orig/netem/pareto.c	2013-11-23 02:10:33.000000000 +0100
++++ iproute2-3.12.0/netem/pareto.c	2014-02-09 11:46:07.000000000 +0100
+@@ -7,10 +7,8 @@
+ #include <math.h>
+ #include <limits.h>
+ 
+-#include <linux/types.h>
+-#include <linux/pkt_sched.h>
+-
+ static const double a=3.0;
++#define NETEM_DIST_SCALE        8192
+ #define TABLESIZE	16384
+ #define TABLEFACTOR	NETEM_DIST_SCALE
+ 

+ 10 - 5
package/iproute2/patches/patch-netem_paretonormal_c

@@ -1,6 +1,6 @@
---- 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 @@
+--- iproute2-3.12.0.orig/netem/paretonormal.c	2013-11-23 02:10:33.000000000 +0100
++++ iproute2-3.12.0/netem/paretonormal.c	2014-02-09 12:22:09.000000000 +0100
+@@ -11,15 +11,11 @@
   */
  #include <stdio.h>
  #include <stdlib.h>
@@ -9,6 +9,11 @@
  #include <math.h>
  #include <limits.h>
 -#include <malloc.h>
+-
+-#include <linux/types.h>
+-#include <linux/pkt_sched.h>
+ 
++#define NETEM_DIST_SCALE	8192
+ #define TABLESIZE	16384
+ #define TABLEFACTOR	NETEM_DIST_SCALE
  
- #include <linux/types.h>
- #include <linux/pkt_sched.h>

+ 11 - 0
package/iproute2/patches/patch-tc_tc_core_h

@@ -0,0 +1,11 @@
+--- iproute2-3.12.0.orig/tc/tc_core.h	2013-11-23 02:10:33.000000000 +0100
++++ iproute2-3.12.0/tc/tc_core.h	2014-02-08 20:19:59.000000000 +0100
+@@ -1,7 +1,7 @@
+ #ifndef _TC_CORE_H_
+ #define _TC_CORE_H_ 1
+ 
+-#include <asm/types.h>
++#include <sys/types.h>
+ #include <linux/pkt_sched.h>
+ 
+ #define TIME_UNITS_PER_SEC	1000000