about summary refs log tree commit diff
path: root/resolv/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'resolv/Makefile')
-rw-r--r--resolv/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/resolv/Makefile b/resolv/Makefile
index 962dbca0b9..a70ee99d08 100644
--- a/resolv/Makefile
+++ b/resolv/Makefile
@@ -27,12 +27,17 @@ distribute := ../conf/portability.h mapv4v6addr.h mapv4v6hostent.h \
 
 routines := herror inet_addr inet_ntop inet_pton nsap_addr res_init
 
-extra-libs := libresolv
+extra-libs := libresolv libnss_dns
 extra-libs-others = $(extra-libs)
 libresolv-routines := gethnamaddr res_comp res_debug	\
 		      res_data res_mkquery res_query res_send		\
 		      inet_net_ntop inet_net_pton inet_neta base64
 
+vpath %.c nss_dns
+
+libnss_dns-routines	:= dns-host dns-network
+libnss_dns-inhibit-o	= $(filter-out .so,$(object-suffixes))
+
 include ../Rules
 
 CPPFLAGS += -Dgethostbyname=res_gethostbyname \
@@ -48,3 +53,6 @@ CPPFLAGS += -Dgethostbyname=res_gethostbyname \
 # This ensures they will load libc.so for needed symbols if loaded by
 # a statically-linked program that hasn't already loaded it.
 $(objpfx)libresolv.so: $(common-objpfx)libc.so
+
+# The DNS NSS modules needs the resolver.
+$(objpfx)libnss_dns.so: $(objpfx)libresolv.so