summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-02 15:22:11 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-02 15:22:11 +0000
commitbe080b7f9e4e16e5febf4a2c79377a73ef61b5b3 (patch)
treea1ac8e96462b2ac8dd0c886108b497273138a0e8
parent40d07f25a3f86bc5a47d959b856b9db5f24fcb49 (diff)
use CMSG_LEN.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/socket/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 9d254e4..68ceb28 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1703,7 +1703,7 @@ unix_send_io(sock, val)
msg.msg_control = (caddr_t)&cmsg;
msg.msg_controllen = CMSG_SPACE(sizeof(int));
msg.msg_flags = 0;
- cmsg.hdr.cmsg_len = CMSG_SPACE(0) + sizeof(int);
+ cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(int));
cmsg.hdr.cmsg_level = SOL_SOCKET;
cmsg.hdr.cmsg_type = SCM_RIGHTS;
cmsg.fd = fd;
@@ -1778,7 +1778,7 @@ unix_recv_io(argc, argv, sock)
msg.msg_control = (caddr_t)&cmsg;
msg.msg_controllen = CMSG_SPACE(sizeof(int));
msg.msg_flags = 0;
- cmsg.hdr.cmsg_len = CMSG_SPACE(0) + sizeof(int);
+ cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(int));
cmsg.hdr.cmsg_level = SOL_SOCKET;
cmsg.hdr.cmsg_type = SCM_RIGHTS;
cmsg.fd = -1;