-
Notifications
You must be signed in to change notification settings - Fork 143
unix: Check libc not os, and zero msghdr private #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @emilio (or someone else) soon. |
src/platform/unix/mod.rs
Outdated
msghdr.msg_iovlen = iovec.len() as IovLen; | ||
msghdr.msg_control = cmsg_buffer as *mut c_void; | ||
msghdr.msg_controllen = cmsg_space as MsgControlLen; | ||
msghdr.msg_flags = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you wrap this into a function? E.g. new_msghdr
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, re-uploaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the noise, I seem to misunderstand how to extract this piece. Will get back to this.
src/platform/unix/mod.rs
Outdated
msg_controllen: cmsg_length as MsgControlLen, | ||
msg_flags: 0, | ||
}, | ||
msghdr: new_msghdr(&mut iovec, cmsg_buffer, cmsg_length as MsgControlLen) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iovec
is already an &mut [iovec]
no need for the &mut
.
Fixes #192. Now builds on musl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@bors-servo r+ |
📌 Commit cee64a7 has been approved by |
unix: Check libc not os, and zero msghdr private Fixes #192 similarly to what [audioipc-2](https://github.com/djg/audioipc-2/blob/1033cf7e4b5d14a138004bbb8708b2a1c3821939/audioipc/src/msg.rs#L79) does. Now builds on musl.
☀️ Test successful - checks-travis, status-appveyor |
Fixes #192 similarly to what audioipc-2 does. Now builds on musl.