summaryrefslogtreecommitdiff
path: root/ext/socket/ipsocket.c
diff options
context:
space:
mode:
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 68ff5a1301c..dd7eb80b55a 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);