Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37877490
en ru br
ALT Linux repos
S:5.17.0-alt2
5.0: 2.6.26-alt1
4.1: 2.6.23-alt2
4.0: 2.6.20.20070313-alt1
3.0: 2.4.7.20020116-alt5.1

Group :: Networking/Other
RPM: iproute2

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: iproute2-2.6.16-libdir.patch
Download


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