diff options
author | kjnash <k.j.nash@usa.net> | 2022-08-31 14:28:57 (GMT) |
---|---|---|
committer | kjnash <k.j.nash@usa.net> | 2022-08-31 14:28:57 (GMT) |
commit | 19f8c3bb6b2aa8d571a7534b588ddacfb49952d3 (patch) | |
tree | 5051f34456c20c798d30e7741fae52575927fd7a /unix/tclUnixCompat.c | |
parent | d9b5be0959a8ee2b81ba519ff3d4c70b2da9a6ce (diff) | |
parent | ff1e919a1bae9ff88ab6dbc094b18cfadedfe8af (diff) | |
download | tcl-19f8c3bb6b2aa8d571a7534b588ddacfb49952d3.zip tcl-19f8c3bb6b2aa8d571a7534b588ddacfb49952d3.tar.gz tcl-19f8c3bb6b2aa8d571a7534b588ddacfb49952d3.tar.bz2 |
Merge old 8.7 674a6ad0472c7
Diffstat (limited to 'unix/tclUnixCompat.c')
-rw-r--r-- | unix/tclUnixCompat.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index 55c5fa9..74b4bf3 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -554,17 +554,17 @@ TclpGetHostByName( ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); #if defined(HAVE_GETHOSTBYNAME_R_5) - int h_errno; + int local_errno; return gethostbyname_r(name, &tsdPtr->hent, tsdPtr->hbuf, - sizeof(tsdPtr->hbuf), &h_errno); + sizeof(tsdPtr->hbuf), &local_errno); #elif defined(HAVE_GETHOSTBYNAME_R_6) struct hostent *hePtr = NULL; - int h_errno, result; + int local_errno, result; result = gethostbyname_r(name, &tsdPtr->hent, tsdPtr->hbuf, - sizeof(tsdPtr->hbuf), &hePtr, &h_errno); + sizeof(tsdPtr->hbuf), &hePtr, &local_errno); return (result == 0) ? hePtr : NULL; #elif defined(HAVE_GETHOSTBYNAME_R_3) @@ -624,17 +624,17 @@ TclpGetHostByAddr( ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); #if defined(HAVE_GETHOSTBYADDR_R_7) - int h_errno; + int local_errno; return gethostbyaddr_r(addr, length, type, &tsdPtr->hent, tsdPtr->hbuf, - sizeof(tsdPtr->hbuf), &h_errno); + sizeof(tsdPtr->hbuf), &local_errno); #elif defined(HAVE_GETHOSTBYADDR_R_8) struct hostent *hePtr; - int h_errno; + int local_errno; return (gethostbyaddr_r(addr, length, type, &tsdPtr->hent, tsdPtr->hbuf, - sizeof(tsdPtr->hbuf), &hePtr, &h_errno) == 0) + sizeof(tsdPtr->hbuf), &hePtr, &local_errno) == 0) ? &tsdPtr->hent : NULL; #else #define NEED_COPYHOSTENT 1 |