2010-11-08 14:46:05 +01:00
|
|
|
---
|
2016-03-26 20:14:46 +01:00
|
|
|
Makefile | 4 ++--
|
|
|
|
netem/Makefile | 6 ++++--
|
|
|
|
tc/q_netem.c | 2 +-
|
|
|
|
3 files changed, 7 insertions(+), 5 deletions(-)
|
2010-11-08 14:46:05 +01:00
|
|
|
|
2016-03-26 20:14:46 +01:00
|
|
|
Index: iproute2-4.5.0/Makefile
|
2010-11-08 14:46:05 +01:00
|
|
|
===================================================================
|
2016-03-26 20:14:46 +01:00
|
|
|
--- iproute2-4.5.0.orig/Makefile
|
|
|
|
+++ iproute2-4.5.0/Makefile
|
2015-06-29 10:08:41 +02:00
|
|
|
@@ -1,6 +1,6 @@
|
|
|
|
PREFIX?=/usr
|
|
|
|
LIBDIR?=$(PREFIX)/lib
|
|
|
|
-SBINDIR?=/sbin
|
|
|
|
+SBINDIR?=/usr/sbin
|
|
|
|
CONFDIR?=/etc/iproute2
|
|
|
|
DATADIR?=$(PREFIX)/share
|
|
|
|
DOCDIR?=$(DATADIR)/doc/iproute2
|
|
|
|
@@ -13,7 +13,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
|
2013-04-15 10:27:29 +02:00
|
|
|
|
2015-06-16 10:47:25 +02:00
|
|
|
SHARED_LIBS = y
|
2009-08-13 23:25:48 +02:00
|
|
|
|
2015-06-16 10:47:25 +02:00
|
|
|
-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
|
|
|
|
+DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DPKGDATADIR=\"$(DATADIR)/tc\"
|
|
|
|
ifneq ($(SHARED_LIBS),y)
|
|
|
|
DEFINES+= -DNO_SHARED_LIBS
|
|
|
|
endif
|
2016-03-26 20:14:46 +01:00
|
|
|
Index: iproute2-4.5.0/netem/Makefile
|
2010-11-08 14:46:05 +01:00
|
|
|
===================================================================
|
2016-03-26 20:14:46 +01:00
|
|
|
--- iproute2-4.5.0.orig/netem/Makefile
|
|
|
|
+++ iproute2-4.5.0/netem/Makefile
|
2010-11-08 14:46:05 +01:00
|
|
|
@@ -5,6 +5,8 @@ HOSTCC ?= $(CC)
|
2009-08-13 23:25:48 +02:00
|
|
|
CCOPTS = $(CBUILD_CFLAGS)
|
|
|
|
LDLIBS += -lm
|
|
|
|
|
|
|
|
+LIBDIR = /usr/lib
|
|
|
|
+
|
|
|
|
all: $(DISTGEN) $(DISTDATA)
|
|
|
|
|
|
|
|
$(DISTGEN):
|
2010-11-08 14:46:05 +01:00
|
|
|
@@ -20,9 +22,9 @@ stats: stats.c
|
2009-08-13 23:25:48 +02:00
|
|
|
$(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
|
|
|
|
|
|
|
|
install: all
|
2010-11-08 14:46:05 +01:00
|
|
|
- mkdir -p $(DESTDIR)$(LIBDIR)/tc
|
2009-08-13 23:25:48 +02:00
|
|
|
+ mkdir -p $(DESTDIR)/usr/share/tc
|
|
|
|
for i in $(DISTDATA); \
|
2010-11-08 14:46:05 +01:00
|
|
|
- do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
|
|
|
|
+ do install -m 644 $$i $(DESTDIR)/usr/share/tc; \
|
2009-08-13 23:25:48 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
clean:
|
2016-03-26 20:14:46 +01:00
|
|
|
Index: iproute2-4.5.0/tc/q_netem.c
|
2015-06-16 10:47:25 +02:00
|
|
|
===================================================================
|
2016-03-26 20:14:46 +01:00
|
|
|
--- iproute2-4.5.0.orig/tc/q_netem.c
|
|
|
|
+++ iproute2-4.5.0/tc/q_netem.c
|
2015-06-16 10:47:25 +02:00
|
|
|
@@ -113,7 +113,7 @@ static int get_distribution(const char *
|
|
|
|
char *line = NULL;
|
|
|
|
char name[128];
|
|
|
|
|
|
|
|
- snprintf(name, sizeof(name), "%s/%s.dist", get_tc_lib(), type);
|
|
|
|
+ snprintf(name, sizeof(name), "%s/%s.dist", PKGDATADIR, type);
|
|
|
|
if ((f = fopen(name, "r")) == NULL) {
|
|
|
|
fprintf(stderr, "No distribution data for %s (%s: %s)\n",
|
|
|
|
type, name, strerror(errno));
|