diff options
author | Stacey Marshall <Stacey.Marshall@Sun.COM> | 2010-04-08 17:04:05 +0100 |
---|---|---|
committer | Stacey Marshall <Stacey.Marshall@Sun.COM> | 2010-04-08 17:04:05 +0100 |
commit | 4e567b4443d7a1680a7319275e5288eef2c92319 (patch) | |
tree | 5a7c88423cf526f1dfc914a0b14a01d9dbc626be /usr/src/lib/libresolv2 | |
parent | b942e89b21c9ea698fd94b07082bee381672203d (diff) | |
download | illumos-joyent-4e567b4443d7a1680a7319275e5288eef2c92319.tar.gz |
6936684 libresolv2 update breaks users of _res
6908650 ifconfig can't configure static ip address if dns before files in nsswitch.conf
Diffstat (limited to 'usr/src/lib/libresolv2')
-rw-r--r-- | usr/src/lib/libresolv2/common/irs/irs_data.c | 8 | ||||
-rw-r--r-- | usr/src/lib/libresolv2/common/resolv/res_data.c | 5 | ||||
-rw-r--r-- | usr/src/lib/libresolv2/common/resolv/res_init.c | 4 |
3 files changed, 13 insertions, 4 deletions
diff --git a/usr/src/lib/libresolv2/common/irs/irs_data.c b/usr/src/lib/libresolv2/common/irs/irs_data.c index cd8ba00c50..c4bd1d6913 100644 --- a/usr/src/lib/libresolv2/common/irs/irs_data.c +++ b/usr/src/lib/libresolv2/common/irs/irs_data.c @@ -1,4 +1,8 @@ /* + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + */ + +/* * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996,1999 by Internet Software Consortium. * @@ -223,11 +227,15 @@ __h_errno(void) { struct net_data *net_data = net_data_init(NULL); if (net_data && net_data->res) return (&net_data->res->res_h_errno); +#ifdef ORIGINAL_ISC_CODE #if !(__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) return(&_res.res_h_errno); #else return (&h_errno); #endif +#else + return (&h_errno); +#endif /* ORIGINAL_ISC_CODE */ } void diff --git a/usr/src/lib/libresolv2/common/resolv/res_data.c b/usr/src/lib/libresolv2/common/resolv/res_data.c index 9297fe311f..be2420da60 100644 --- a/usr/src/lib/libresolv2/common/resolv/res_data.c +++ b/usr/src/lib/libresolv2/common/resolv/res_data.c @@ -1,6 +1,5 @@ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -91,9 +90,11 @@ struct __res_state _res # endif ; +#ifdef ORIGINAL_ISC_CODE #if defined(DO_PTHREADS) || defined(__linux) #define _res (*__res_state()) #endif +#endif /* Proto. */ diff --git a/usr/src/lib/libresolv2/common/resolv/res_init.c b/usr/src/lib/libresolv2/common/resolv/res_init.c index e839323a79..477f4f5f73 100644 --- a/usr/src/lib/libresolv2/common/resolv/res_init.c +++ b/usr/src/lib/libresolv2/common/resolv/res_init.c @@ -1,6 +1,5 @@ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -615,6 +614,7 @@ __res_vinit(res_state statp, int preinit) { return (statp->res_h_errno); #ifdef SUNW_INITCHKIF freedata: + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); if (statp->_u._ext.ext != NULL) { free(statp->_u._ext.ext); statp->_u._ext.ext = NULL; |