summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-13 23:20:27 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-13 23:20:27 +0000
commited193c50f52635923840991b8847211846a018f9 (patch)
tree9325efce45ce39f367dbb86389f649d7c5ba5aa8 /ext/socket/extconf.rb
parenteb4ae6bc542cdec0ade408c2f5ddfebba227d30f (diff)
* ext/socket/extconf.rb: don't define HAVE_SA_LEN and HAVE_SA_LEN.
use HAVE_STRUCT_SOCKADDR_SA_LEN and HAVE_STRUCT_SOCKADDR_IN_SIN_LEN instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 5721f90d..eff2d3f 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -74,9 +74,9 @@ have_type("struct ip_mreq", headers) # 4.4BSD
have_type("struct ip_mreqn", headers) # Linux 2.4
have_type("struct ipv6_mreq", headers) # RFC 3493
-if have_struct_member("struct sockaddr_in", "sin_len", headers)
- $defs[-1] = "-DHAVE_SIN_LEN" # change from -DHAVE_ST_SIN_LEN.
-end
+# 4.4BSD
+have_struct_member("struct sockaddr", "sa_len", headers)
+have_struct_member("struct sockaddr_in", "sin_len", headers)
# doug's fix, NOW add -Dss_family... only if required!
doug = proc {have_struct_member("struct sockaddr_storage", "ss_family", headers)}
@@ -87,10 +87,6 @@ if (doug[] or
doug[] or with_cppflags($CPPFLAGS + " -Dss_len=__ss_len", &doug)
end
-if have_struct_member("struct sockaddr", "sa_len", headers)
- $defs[-1] = "-DHAVE_SA_LEN " # change from -DHAVE_ST_SA_LEN.
-end
-
have_struct_member('struct msghdr', 'msg_control', ['sys/types.h', 'sys/socket.h'])
have_struct_member('struct msghdr', 'msg_accrights', ['sys/types.h', 'sys/socket.h'])