summaryrefslogtreecommitdiff
path: root/ext/socket/ipsocket.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-28 08:14:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-28 08:14:13 +0000
commit4822d20cc55d54d0c3cb190fdcb343976db64901 (patch)
tree5c6d684e1615f4c0559fff9480ed25f2c3e5c887 /ext/socket/ipsocket.c
parent790d6071c6d0d2c677b01779fecb891d64095ded (diff)
* ext/socket: fixed types.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/ipsocket.c')
-rw-r--r--ext/socket/ipsocket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/socket/ipsocket.c b/ext/socket/ipsocket.c
index 68ff5a1..dd7eb80 100644
--- a/ext/socket/ipsocket.c
+++ b/ext/socket/ipsocket.c
@@ -73,7 +73,7 @@ init_inetsock_internal(struct inetsock_arg *arg)
#if !defined(_WIN32) && !defined(__CYGWIN__)
status = 1;
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
- (char*)&status, sizeof(status));
+ (char*)&status, (socklen_t)sizeof(status));
#endif
status = bind(fd, res->ai_addr, res->ai_addrlen);
syscall = "bind(2)";
@@ -185,7 +185,7 @@ ip_addr(int argc, VALUE *argv, VALUE sock)
{
rb_io_t *fptr;
struct sockaddr_storage addr;
- socklen_t len = sizeof addr;
+ socklen_t len = (socklen_t)sizeof addr;
int norevlookup;
GetOpenFile(sock, fptr);
@@ -226,7 +226,7 @@ ip_peeraddr(int argc, VALUE *argv, VALUE sock)
{
rb_io_t *fptr;
struct sockaddr_storage addr;
- socklen_t len = sizeof addr;
+ socklen_t len = (socklen_t)sizeof addr;
int norevlookup;
GetOpenFile(sock, fptr);