summaryrefslogtreecommitdiff
path: root/ext/socket/rubysocket.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-06 07:58:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-06 07:58:51 +0000
commitc7135ddd2dcd59ca46ea3307b21f68dea7504ac8 (patch)
treeca957b72291232741b6d7f14b9dd32fefb9e2d61 /ext/socket/rubysocket.h
parent7e4a95cd062ac961a91b7b7185b75c103bc7496d (diff)
socket/extconf.rb: RSTRING_SOCKLEN
* ext/socket/extconf.rb (RSTRING_SOCKLEN): macro to cast RSTRING_LEN to socklen_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/rubysocket.h')
-rw-r--r--ext/socket/rubysocket.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index 133276c..c68cff1 100644
--- a/ext/socket/rubysocket.h
+++ b/ext/socket/rubysocket.h
@@ -91,6 +91,9 @@
#ifndef HAVE_TYPE_SOCKLEN_T
typedef int socklen_t;
#endif
+#ifndef RSTRING_SOCKLEN
+# define RSTRING_SOCKLEN (socklen_t)RSTRING_LENINT
+#endif
#ifndef EWOULDBLOCK
# define EWOULDBLOCK EAGAIN