aboutsummaryrefslogtreecommitdiffstats
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/socket.c')
-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 d9b2e8d606..72cf058a78 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));
}