summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/poll.rs2
-rw-r--r--src/sys/epoll.rs2
-rw-r--r--src/sys/socket/mod.rs4
-rw-r--r--src/sys/time.rs2
-rw-r--r--src/sys/uio.rs2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/poll.rs b/src/poll.rs
index 15bafe2d..fbdd09de 100644
--- a/src/poll.rs
+++ b/src/poll.rs
@@ -17,7 +17,7 @@ use errno::Errno;
///
/// After a call to `poll` or `ppoll`, the events that occured can be
/// retrieved by calling [`revents()`](#method.revents) on the `PollFd`.
-#[repr(C)]
+#[repr(transparent)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct PollFd {
pollfd: libc::pollfd,
diff --git a/src/sys/epoll.rs b/src/sys/epoll.rs
index fef6f4e3..074a8451 100644
--- a/src/sys/epoll.rs
+++ b/src/sys/epoll.rs
@@ -43,7 +43,7 @@ libc_bitflags!{
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
-#[repr(C)]
+#[repr(transparent)]
pub struct EpollEvent {
event: libc::epoll_event,
}
diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs
index 1f627614..52768c93 100644
--- a/src/sys/socket/mod.rs
+++ b/src/sys/socket/mod.rs
@@ -278,7 +278,7 @@ cfg_if! {
/// Request for multicast socket operations
///
/// This is a wrapper type around `ip_mreq`.
-#[repr(C)]
+#[repr(transparent)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct IpMembershipRequest(libc::ip_mreq);
@@ -297,7 +297,7 @@ impl IpMembershipRequest {
/// Request for ipv6 multicast socket operations
///
/// This is a wrapper type around `ipv6_mreq`.
-#[repr(C)]
+#[repr(transparent)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct Ipv6MembershipRequest(libc::ipv6_mreq);
diff --git a/src/sys/time.rs b/src/sys/time.rs
index 06475001..51baa9e1 100644
--- a/src/sys/time.rs
+++ b/src/sys/time.rs
@@ -245,7 +245,7 @@ impl fmt::Display for TimeSpec {
-#[repr(C)]
+#[repr(transparent)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct TimeVal(timeval);
diff --git a/src/sys/uio.rs b/src/sys/uio.rs
index d089084e..7dfeff77 100644
--- a/src/sys/uio.rs
+++ b/src/sys/uio.rs
@@ -158,7 +158,7 @@ pub fn process_vm_readv(pid: ::unistd::Pid, local_iov: &[IoVec<&mut [u8]>], remo
Errno::result(res).map(|r| r as usize)
}
-#[repr(C)]
+#[repr(transparent)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct IoVec<T>(libc::iovec, PhantomData<T>);