aboutsummaryrefslogtreecommitdiffstats
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 3ce8316c4f..9125ec1ec3 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -110,6 +110,13 @@ end
have_header("netinet/tcp.h") if /cygwin/ !~ RUBY_PLATFORM # for cygwin 1.1.5
have_header("netinet/udp.h")
+%w[
+ IPPROTO_IP
+ IPPROTO_IPV6
+].each {|name|
+ have_const(name, headers)
+}
+
if (have_func("sendmsg") | have_func("recvmsg")) && /64-darwin/ !~ RUBY_PLATFORM
# CMSG_ macros are broken on 64bit darwin, because of use of __DARWIN_ALIGN.
have_struct_member('struct msghdr', 'msg_control', ['sys/types.h', 'sys/socket.h'])