diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-16 14:07:50 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-16 14:07:50 +0000 |
commit | a294d45808d9115d16df064cc501fee4fe8fffb3 (patch) | |
tree | 1fd050c49b975aab346b45b1c2a65b7d37b7ee88 /ext | |
parent | da91385f2c242ac2fbf9f2f3e64e27a78096de11 (diff) | |
download | ruby-a294d45808d9115d16df064cc501fee4fe8fffb3.tar.gz |
* ext/socket/unixsocket.c (unix_send_io): Suppress a warning by clang.
(unix_recv_io): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/socket/unixsocket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c index 3d3fc889e1..38cfa7aa94 100644 --- a/ext/socket/unixsocket.c +++ b/ext/socket/unixsocket.c @@ -208,9 +208,9 @@ unix_send_io(VALUE sock, VALUE val) char buf[1]; #if FD_PASSING_BY_MSG_CONTROL - struct { + union { struct cmsghdr hdr; - char pad[8+sizeof(int)+8]; + char pad[sizeof(struct cmsghdr)+8+sizeof(int)+8]; } cmsg; #endif @@ -303,9 +303,9 @@ unix_recv_io(int argc, VALUE *argv, VALUE sock) int fd; #if FD_PASSING_BY_MSG_CONTROL - struct { + union { struct cmsghdr hdr; - char pad[8+sizeof(int)+8]; + char pad[sizeof(struct cmsghdr)+8+sizeof(int)+8]; } cmsg; #endif |