diff --git a/ext/socket/socket.c b/ext/socket/socket.c index d05e5a3e42..059011669a 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -53,7 +53,7 @@ rsock_sys_fail_sockaddr(const char *mesg, VALUE addr) rai = rsock_addrinfo_new( (struct sockaddr *)RSTRING_PTR(addr), - RSTRING_LEN(addr), + (socklen_t)RSTRING_LEN(addr), /* overflow should be checked already */ PF_UNSPEC, 0, 0, Qnil, Qnil); rsock_sys_fail_addrinfo(mesg, rai);