Skip to contentSkip to conversation

iproute2: drop libresolv

PATCH/RFC Andreas Henriksson 2 participants 2 messages Nov 10, 2012 – Nov 12, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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).

Makefile +0 -4
index 917862b..46a5ad9 100644
@@ -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
 
lib/utils.c +0 -1
index d80f79b..7ecaab3 100644
@@ -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>
misc/ss.c +0 -1
index a0ab2e9..b45f5ba 100644
@@ -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>
#1 lore raw
Quoted 12 lines · On Sat, 10 Nov 2012 13:22:10 +0100 Andreas Henriksson <[email protected]> wrote:

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?

Quoted 8 lines

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).

Makes sense, applied.