summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/socket/init.c b/ext/socket/init.c
index cc44f94..313e11b 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -305,9 +305,13 @@ rsock_socket0(int domain, int type, int proto)
#endif
if (ret == -1)
return -1;
+#ifdef SOCK_CLOEXEC
fix_cloexec:
+#endif
rb_maygvl_fd_fix_cloexec(ret);
+#ifdef SOCK_CLOEXEC
update_max_fd:
+#endif
rb_update_max_fd(ret);
return ret;