summaryrefslogtreecommitdiff
path: root/ext/socket/unixsocket.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-16 14:07:50 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-16 14:07:50 +0000
commita294d45808d9115d16df064cc501fee4fe8fffb3 (patch)
tree1fd050c49b975aab346b45b1c2a65b7d37b7ee88 /ext/socket/unixsocket.c
parentda91385f2c242ac2fbf9f2f3e64e27a78096de11 (diff)
* 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/socket/unixsocket.c')
-rw-r--r--ext/socket/unixsocket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c
index 3d3fc88..38cfa7a 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