From d17a729b483109285ac4913c3fe4f2c620b87fc6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 21 Dec 1998 12:25:07 +0000 Subject: Update. 1998-12-21 Ulrich Drepper * inet/gethstbynm_r.c: Remove NEED__RES definition since we do this anyway for digits_dots.c. * nss/getXXbyYY.c: Initialize _res before using digits_dots.c functions. * nss/getXXbyYY_r.c: Likewise. 1998-12-19 Andreas Schwab * sunrpc/key_call.c (getkeyserv_handle): Use __fcntl instead of fcntl. 1998-12-20 Andreas Schwab * locale/weight.h (get_weight): Extract string elements as unsigned values. --- nss/getXXbyYY.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nss/getXXbyYY.c') diff --git a/nss/getXXbyYY.c b/nss/getXXbyYY.c index 21baad9474..a79fd08fef 100644 --- a/nss/getXXbyYY.c +++ b/nss/getXXbyYY.c @@ -96,6 +96,16 @@ FUNCTION_NAME (ADD_PARAMS) if (buffer != NULL) { #ifdef HANDLE_DIGITS_DOTS + /* We have to test for the use of IPv6 which can only be done by + examining `_res'. */ + if ((_res.options & RES_INIT) == 0 && res_init () == -1) + { +# ifdef NEED_H_ERRNO + h_errno_tmp = NETDB_INTERNAL; +# endif + result = NULL; + goto done; + } # include "digits_dots.c" #endif } -- cgit 1.4.1