Skip to content

Commit b1144cc

Browse files
committed
libc can't use derive(Copy,Clone) because it doesn't work in rustc
1 parent 6bd95e4 commit b1144cc

File tree

1 file changed

+6
-1
lines changed
  • src/unix/linux_like/linux/gnu

1 file changed

+6
-1
lines changed

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,14 +317,19 @@ cfg_if! {
317317
if #[cfg(libc_union)] {
318318
// Internal, for casts to access union fields
319319
#[repr(C)]
320-
#[derive(Copy,Clone)]
321320
struct sifields_sigchld {
322321
si_pid: ::pid_t,
323322
si_uid: ::uid_t,
324323
si_status: ::c_int,
325324
si_utime: ::c_long,
326325
si_stime: ::c_long,
327326
}
327+
impl ::Copy for sifields_sigchld {}
328+
impl ::Clone for sifields_sigchld {
329+
fn clone(&self) -> sifields_sigchld {
330+
*self
331+
}
332+
}
328333

329334
// Internal, for casts to access union fields
330335
#[repr(C)]

0 commit comments

Comments
 (0)