summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/raddrinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index 5bdde2584a..237055df8f 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -525,7 +525,7 @@ rsock_fd_family(int fd)
socklen_t sa_len = sizeof(sa);
if (fd < 0 || getsockname(fd, &sa, &sa_len) != 0 ||
- sa_len < offsetof(struct sockaddr, sa_family) + sizeof(sa.sa_family)) {
+ (size_t)sa_len < offsetof(struct sockaddr, sa_family) + sizeof(sa.sa_family)) {
return AF_UNSPEC;
}
return sa.sa_family;