summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIOSock.c7
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;
}