summaryrefslogtreecommitdiff
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r--ext/socket/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index d037be02c7..5b0c7049df 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -840,7 +840,7 @@ host_str(host, hbuf, len)
return NULL;
}
else if (rb_obj_is_kind_of(host, rb_cInteger)) {
- long i = NUM2LONG(host);
+ unsigned long i = NUM2ULONG(host);
make_inetaddr(htonl(i), hbuf, len);
return hbuf;