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 | bf0457f646f2d6667b2a7bc12204a152d54e25b3 (patch) | |
tree | 23048c867d271af90c3f916a04714fda3de840b3 /generic/tclIOSock.c | |
parent | 6a1fc1d164f5f9d720d54ac38e05cb3cc41dca06 (diff) | |
download | tcl-bf0457f646f2d6667b2a7bc12204a152d54e25b3.zip tcl-bf0457f646f2d6667b2a7bc12204a152d54e25b3.tar.gz tcl-bf0457f646f2d6667b2a7bc12204a152d54e25b3.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; } |