summary refs log tree commit diff
path: root/nss/Makefile
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-09-01 09:34:29 +0200
committerFlorian Weimer <fweimer@redhat.com>2017-09-01 09:34:29 +0200
commitf4a6be2582b8dfe8adfa68da3dd8decf566b3983 (patch)
tree76ea7e82a506bf4aed59e1492eaa1970b575bf99 /nss/Makefile
parent5f8340f583fe3d4f5734bd2371c5a45ecff2db0d (diff)
downloadglibc-f4a6be2582b8dfe8adfa68da3dd8decf566b3983.tar.gz
glibc-f4a6be2582b8dfe8adfa68da3dd8decf566b3983.tar.xz
glibc-f4a6be2582b8dfe8adfa68da3dd8decf566b3983.zip
getaddrinfo: Fix error handling in gethosts [BZ #21915] [BZ #21922]
The old code uses errno as the primary indicator for success or
failure.  This is wrong because errno is only set for specific
combinations of the status return value and the h_errno variable.
Diffstat (limited to 'nss/Makefile')
-rw-r--r--nss/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/nss/Makefile b/nss/Makefile
index 0369249f30..c9a5200f96 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -60,6 +60,11 @@ tests			= test-netdb test-digits-dots tst-nss-getpwent bug17079 \
 			  tst-nss-test5
 xtests			= bug-erange
 
+# Tests which need libdl
+ifeq (yes,$(build-shared))
+tests += tst-nss-files-hosts-erange
+endif
+
 # If we have a thread library then we can test cancellation against
 # some routines like getpwuid_r.
 ifeq (yes,$(have-thread-library))
@@ -156,3 +161,5 @@ $(patsubst %,$(objpfx)%.out,$(tests)) : \
 ifeq (yes,$(have-thread-library))
 $(objpfx)tst-cancel-getpwuid_r: $(shared-thread-library)
 endif
+
+$(objpfx)tst-nss-files-hosts-erange: $(libdl)