From f4a6be2582b8dfe8adfa68da3dd8decf566b3983 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 1 Sep 2017 09:34:29 +0200 Subject: 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. --- nss/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nss/Makefile') 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) -- cgit 1.4.1