summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index d9b2e8d60..72cf058a7 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -533,7 +533,9 @@ raise_socket_error(reason, error)
char *reason;
int error;
{
+#ifdef EAI_SYSTEM
if (error == EAI_SYSTEM) rb_sys_fail(reason);
+#endif
rb_raise(rb_eSocket, "%s: %s", reason, gai_strerror(error));
}