From: Mark Andrews Date: Mon, 9 Jul 2007 01:54:50 +0000 (+0000) Subject: 2205. [bug] libbind: change #2119 broke thread support. [RT #16982] X-Git-Tag: v9.2.0b1^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35637bd1b8df57c2dac3388e99d3cbe8c6c8b402;p=thirdparty%2Fbind9.git 2205. [bug] libbind: change #2119 broke thread support. [RT #16982] --- diff --git a/CHANGES b/CHANGES index d805bfec5a9..301afc0c3ed 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +2205. [bug] libbind: change #2119 broke thread support. [RT #16982] + 2203. [security] Query id generation was cryptographically weak. [RT # 16915] diff --git a/lib/bind/resolv/res_init.c b/lib/bind/resolv/res_init.c index f0c6489edc6..639f277681c 100644 --- a/lib/bind/resolv/res_init.c +++ b/lib/bind/resolv/res_init.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; -static const char rcsid[] = "$Id: res_init.c,v 1.9.2.12 2006/12/11 04:45:19 marka Exp $"; +static const char rcsid[] = "$Id: res_init.c,v 1.9.2.13 2007/07/09 01:54:50 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include "port_before.h" @@ -168,7 +168,7 @@ __res_vinit(res_state statp, int preinit) { union res_sockaddr_union u[2]; int maxns = MAXNS; - h_errno = 0; + RES_SET_H_ERRNO(statp, 0); if (statp->_u._ext.ext != NULL) res_ndestroy(statp); @@ -231,7 +231,7 @@ __res_vinit(res_state statp, int preinit) { * to check our return code wont be able to make * queries anyhow. */ - h_errno = statp->res_h_errno = NETDB_INTERNAL; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); maxns = 0; } #ifdef RESOLVSORT @@ -498,7 +498,7 @@ __res_vinit(res_state statp, int preinit) { if ((cp = getenv("RES_OPTIONS")) != NULL) res_setoptions(statp, cp, "env"); statp->options |= RES_INIT; - return (h_errno); + return (statp->res_h_errno); } static void