]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute2: drop libresolv
authorAndreas Henriksson <andreas@fatal.se>
Sat, 10 Nov 2012 12:22:10 +0000 (13:22 +0100)
committerStephen Hemminger <shemminger@vyatta.com>
Mon, 12 Nov 2012 16:50:15 +0000 (08:50 -0800)
Hello!

While building the iproute package in Debian I get warnings from
package helpers like this:

dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/iproute/sbin/tc debian/iproute/usr/bin/lnstat debian/iproute/bin/ip debian/iproute/bin/ss debian/iproute/sbin/bridge debian/iproute/sbin/rtmon were not linked against libresolv.so.2 (they use none of the library's symbols)

The -lresolv in ./Makefile seems to come from pre-historic times (before
iproute2 git history, possibly from libc5/pre-glibc days).
I couldn't find out if/why there was any reason for linking to libresolv.
Does anyone know if there are any valid reasons for keeping it still?

If not, I'd be happy to see it go.... while at it I also removed includes
of <resolv.h> which I also couldn't find any reason for, but this is
just an added bonus of the patch (and there are probably more unneeded
includes that could be dropped in the same sources).

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Makefile
lib/utils.c
misc/ss.c

index 917862b05ddc0b6651a20d9e9e3d2a620ef2548d..46a5ad9b913044f4a8825ce68ad1c04046c3f74c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,10 +20,6 @@ endif
 
 DEFINES+=-DCONFDIR=\"$(CONFDIR)\"
 
-#options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
-LDLIBS=-lresolv
-ADDLIB=
-
 #options for decnet
 ADDLIB+=dnet_ntop.o dnet_pton.o
 
index d80f79b4fa26c690acc227ec932235f1e9f6521e..7ecaab3c5ac3666eb3a482011bc43be97a542e4b 100644 (file)
@@ -20,7 +20,6 @@
 #include <string.h>
 #include <netdb.h>
 #include <arpa/inet.h>
-#include <resolv.h>
 #include <asm/types.h>
 #include <linux/pkt_sched.h>
 #include <time.h>
index a0ab2e97cb8aea3f684d07b38df1cdc278c57bbe..b45f5ba1bde53b2e9a4924d1ff997019a56b8f3f 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -22,7 +22,6 @@
 #include <errno.h>
 #include <netdb.h>
 #include <arpa/inet.h>
-#include <resolv.h>
 #include <dirent.h>
 #include <fnmatch.h>
 #include <getopt.h>