diff options
author | max <max@tclers.tk> | 2012-06-26 08:05:18 (GMT) |
---|---|---|
committer | max <max@tclers.tk> | 2012-06-26 08:05:18 (GMT) |
commit | 4224d0a2e6ab6bbe9c3e6f84487cbf9371a168c1 (patch) | |
tree | 23048c867d271af90c3f916a04714fda3de840b3 /generic/tclIOSock.c | |
parent | ee31f09c473f73d2089d8c95d2e244222d4d247b (diff) | |
download | tcl-4224d0a2e6ab6bbe9c3e6f84487cbf9371a168c1.zip tcl-4224d0a2e6ab6bbe9c3e6f84487cbf9371a168c1.tar.gz tcl-4224d0a2e6ab6bbe9c3e6f84487cbf9371a168c1.tar.bz2 |
Use EAI_SYSTEM only if it exists.
Diffstat (limited to 'generic/tclIOSock.c')
-rw-r--r-- | generic/tclIOSock.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c index 6a7be7e..ff23d5d 100644 --- a/generic/tclIOSock.c +++ b/generic/tclIOSock.c @@ -206,9 +206,12 @@ TclCreateSocketAddress( } if (result != 0) { - if (result != EAI_SYSTEM) { +#ifdef EAI_SYSTEM /* Doesn't exist on Windows */ + if (result == EAI_SYSTEM) + *errorMsgPtr = Tcl_PosixError(interp); + else +#endif *errorMsgPtr = gai_strerror(result); - } return 0; } |