|
|
6f2fda2 |
--- iproute2-2.6.16-060323/tc/Makefile.libdir 2005-07-06 00:11:37.000000000 +0200
|
|
|
6f2fda2 |
+++ iproute2-2.6.16-060323/tc/Makefile 2006-03-27 07:09:28.000000000 +0200
|
|
|
6f2fda2 |
@@ -42,7 +42,7 @@
|
|
|
6f2fda2 |
TCLIB += tc_cbq.o
|
|
|
6f2fda2 |
TCLIB += tc_estimator.o
|
|
|
6f2fda2 |
|
|
|
6f2fda2 |
-CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PROB
|
|
|
6f2fda2 |
+CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PROB -DLIBDIR=\"$(LIBDIR)\"
|
|
|
6f2fda2 |
|
|
|
6f2fda2 |
TCSO :=
|
|
|
6f2fda2 |
TCSO += q_netem.so
|
|
|
6f2fda2 |
--- iproute2-2.6.16-060323/tc/q_netem.c.libdir 2005-12-10 01:01:02.000000000 +0100
|
|
|
6f2fda2 |
+++ iproute2-2.6.16-060323/tc/q_netem.c 2006-03-27 07:09:28.000000000 +0200
|
|
|
6f2fda2 |
@@ -60,7 +60,11 @@
|
|
|
6f2fda2 |
char *line = NULL;
|
|
|
6f2fda2 |
char name[128];
|
|
|
6f2fda2 |
|
|
|
6f2fda2 |
+ #ifdef LIBDIR
|
|
|
6f2fda2 |
+ snprintf(name, sizeof(name), "%s/tc/%s.dist", LIBDIR, type);
|
|
|
6f2fda2 |
+ #else
|
|
|
6f2fda2 |
snprintf(name, sizeof(name), "/usr/lib/tc/%s.dist", type);
|
|
|
6f2fda2 |
+ #endif
|
|
|
6f2fda2 |
if ((f = fopen(name, "r")) == NULL) {
|
|
|
6f2fda2 |
fprintf(stderr, "No distribution data for %s (%s: %s)\n",
|
|
|
6f2fda2 |
type, name, strerror(errno));
|
|
|
6f2fda2 |
--- iproute2-2.6.16-060323/tc/tc.c.libdir 2005-10-07 18:33:21.000000000 +0200
|
|
|
6f2fda2 |
+++ iproute2-2.6.16-060323/tc/tc.c 2006-03-27 07:11:53.000000000 +0200
|
|
|
6f2fda2 |
@@ -98,8 +98,11 @@
|
|
|
6f2fda2 |
for (q = qdisc_list; q; q = q->next)
|
|
|
6f2fda2 |
if (strcmp(q->id, str) == 0)
|
|
|
6f2fda2 |
return q;
|
|
|
6f2fda2 |
-
|
|
|
6f2fda2 |
+ #ifdef LIBDIR
|
|
|
6f2fda2 |
+ snprintf(buf, sizeof(buf), "%s/tc/q_%s.so", LIBDIR, str);
|
|
|
6f2fda2 |
+ #else
|
|
|
6f2fda2 |
snprintf(buf, sizeof(buf), "/usr/lib/tc/q_%s.so", str);
|
|
|
6f2fda2 |
+ #endif
|
|
|
6f2fda2 |
dlh = dlopen(buf, RTLD_LAZY);
|
|
|
6f2fda2 |
if (!dlh) {
|
|
|
6f2fda2 |
/* look in current binary, only open once */
|
|
|
6f2fda2 |
@@ -144,8 +147,11 @@
|
|
|
6f2fda2 |
for (q = filter_list; q; q = q->next)
|
|
|
6f2fda2 |
if (strcmp(q->id, str) == 0)
|
|
|
6f2fda2 |
return q;
|
|
|
6f2fda2 |
-
|
|
|
6f2fda2 |
+ #ifdef LIBDIR
|
|
|
6f2fda2 |
+ snprintf(buf, sizeof(buf), "%s/tc/f_%s.so", LIBDIR, str);
|
|
|
6f2fda2 |
+ #else
|
|
|
6f2fda2 |
snprintf(buf, sizeof(buf), "/usr/lib/tc/f_%s.so", str);
|
|
|
6f2fda2 |
+ #endif
|
|
|
6f2fda2 |
dlh = dlopen(buf, RTLD_LAZY);
|
|
|
6f2fda2 |
if (dlh == NULL) {
|
|
|
6f2fda2 |
dlh = BODY;
|