You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the way PollFd is passed to the FFI poll function (.as_mut_ptr() as *mut libc::pollfd), the struct should be repr(transparent), so Rust will guarantee that PollFd has the same layout as libc::pollfd.
The text was updated successfully, but these errors were encountered:
1243: Apply `repr(transparent)` to several FFI types r=asomers a=asomers
repr(transparent) is required in order to safely cast between an FFI
type and its NewType. This commit applies that attribute to PollFd,
EpollEvent, IpMembershipRequest, Ipv6MembershipRequest, TimeVal, and
IoVec.
Fixes#1241
Co-authored-by: Alan Somers <asomers@gmail.com>
Given the way
PollFd
is passed to the FFIpoll
function (.as_mut_ptr() as *mut libc::pollfd
), the struct should berepr(transparent)
, so Rust will guarantee thatPollFd
has the same layout aslibc::pollfd
.The text was updated successfully, but these errors were encountered: