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 a5780063dd4..7dfe02fc64e 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1157,7 +1157,7 @@ sock_s_getnameinfo(int argc, VALUE *argv)
rb_raise(rb_eTypeError, "sockaddr length too big");
}
memcpy(&ss, RSTRING_PTR(sa), RSTRING_LEN(sa));
- if (RSTRING_LEN(sa) != SA_LEN((struct sockaddr*)&ss)) {
+ if (RSTRING_LEN(sa) != SS_LEN(&ss)) {
rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
}
sap = (struct sockaddr*)&ss;