-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
365 additions
and
0 deletions.
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
docker/test-base/patches/libc+armv5te-unknown-linux-uclibceabi.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs | ||
index 4afb98e95..67d5ba1b3 100644 | ||
--- a/src/unix/linux_like/linux/uclibc/mod.rs | ||
+++ b/src/unix/linux_like/linux/uclibc/mod.rs | ||
@@ -107,6 +107,68 @@ struct siginfo_si_value { | ||
} | ||
} | ||
|
||
+cfg_if! { | ||
+ if #[cfg(libc_union)] { | ||
+ // Internal, for casts to access union fields | ||
+ #[repr(C)] | ||
+ struct sifields_sigchld { | ||
+ si_pid: ::pid_t, | ||
+ si_uid: ::uid_t, | ||
+ si_status: ::c_int, | ||
+ si_utime: ::c_long, | ||
+ si_stime: ::c_long, | ||
+ } | ||
+ impl ::Copy for sifields_sigchld {} | ||
+ impl ::Clone for sifields_sigchld { | ||
+ fn clone(&self) -> sifields_sigchld { | ||
+ *self | ||
+ } | ||
+ } | ||
+ | ||
+ // Internal, for casts to access union fields | ||
+ #[repr(C)] | ||
+ union sifields { | ||
+ _align_pointer: *mut ::c_void, | ||
+ sigchld: sifields_sigchld, | ||
+ } | ||
+ | ||
+ // Internal, for casts to access union fields. Note that some variants | ||
+ // of sifields start with a pointer, which makes the alignment of | ||
+ // sifields vary on 32-bit and 64-bit architectures. | ||
+ #[repr(C)] | ||
+ struct siginfo_f { | ||
+ _siginfo_base: [::c_int; 3], | ||
+ sifields: sifields, | ||
+ } | ||
+ | ||
+ impl siginfo_t { | ||
+ unsafe fn sifields(&self) -> &sifields { | ||
+ &(*(self as *const siginfo_t as *const siginfo_f)).sifields | ||
+ } | ||
+ | ||
+ pub unsafe fn si_pid(&self) -> ::pid_t { | ||
+ self.sifields().sigchld.si_pid | ||
+ } | ||
+ | ||
+ pub unsafe fn si_uid(&self) -> ::uid_t { | ||
+ self.sifields().sigchld.si_uid | ||
+ } | ||
+ | ||
+ pub unsafe fn si_status(&self) -> ::c_int { | ||
+ self.sifields().sigchld.si_status | ||
+ } | ||
+ | ||
+ pub unsafe fn si_utime(&self) -> ::c_long { | ||
+ self.sifields().sigchld.si_utime | ||
+ } | ||
+ | ||
+ pub unsafe fn si_stime(&self) -> ::c_long { | ||
+ self.sifields().sigchld.si_stime | ||
+ } | ||
+ } | ||
+ } | ||
+} | ||
+ | ||
pub const MCL_CURRENT: ::c_int = 0x0001; | ||
pub const MCL_FUTURE: ::c_int = 0x0002; | ||
pub const MCL_ONFAULT: ::c_int = 0x0004; |
73 changes: 73 additions & 0 deletions
73
docker/test-base/patches/libc+armv7-unknown-linux-uclibceabi.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs | ||
index 4afb98e95..67d5ba1b3 100644 | ||
--- a/src/unix/linux_like/linux/uclibc/mod.rs | ||
+++ b/src/unix/linux_like/linux/uclibc/mod.rs | ||
@@ -107,6 +107,68 @@ struct siginfo_si_value { | ||
} | ||
} | ||
|
||
+cfg_if! { | ||
+ if #[cfg(libc_union)] { | ||
+ // Internal, for casts to access union fields | ||
+ #[repr(C)] | ||
+ struct sifields_sigchld { | ||
+ si_pid: ::pid_t, | ||
+ si_uid: ::uid_t, | ||
+ si_status: ::c_int, | ||
+ si_utime: ::c_long, | ||
+ si_stime: ::c_long, | ||
+ } | ||
+ impl ::Copy for sifields_sigchld {} | ||
+ impl ::Clone for sifields_sigchld { | ||
+ fn clone(&self) -> sifields_sigchld { | ||
+ *self | ||
+ } | ||
+ } | ||
+ | ||
+ // Internal, for casts to access union fields | ||
+ #[repr(C)] | ||
+ union sifields { | ||
+ _align_pointer: *mut ::c_void, | ||
+ sigchld: sifields_sigchld, | ||
+ } | ||
+ | ||
+ // Internal, for casts to access union fields. Note that some variants | ||
+ // of sifields start with a pointer, which makes the alignment of | ||
+ // sifields vary on 32-bit and 64-bit architectures. | ||
+ #[repr(C)] | ||
+ struct siginfo_f { | ||
+ _siginfo_base: [::c_int; 3], | ||
+ sifields: sifields, | ||
+ } | ||
+ | ||
+ impl siginfo_t { | ||
+ unsafe fn sifields(&self) -> &sifields { | ||
+ &(*(self as *const siginfo_t as *const siginfo_f)).sifields | ||
+ } | ||
+ | ||
+ pub unsafe fn si_pid(&self) -> ::pid_t { | ||
+ self.sifields().sigchld.si_pid | ||
+ } | ||
+ | ||
+ pub unsafe fn si_uid(&self) -> ::uid_t { | ||
+ self.sifields().sigchld.si_uid | ||
+ } | ||
+ | ||
+ pub unsafe fn si_status(&self) -> ::c_int { | ||
+ self.sifields().sigchld.si_status | ||
+ } | ||
+ | ||
+ pub unsafe fn si_utime(&self) -> ::c_long { | ||
+ self.sifields().sigchld.si_utime | ||
+ } | ||
+ | ||
+ pub unsafe fn si_stime(&self) -> ::c_long { | ||
+ self.sifields().sigchld.si_stime | ||
+ } | ||
+ } | ||
+ } | ||
+} | ||
+ | ||
pub const MCL_CURRENT: ::c_int = 0x0001; | ||
pub const MCL_FUTURE: ::c_int = 0x0002; | ||
pub const MCL_ONFAULT: ::c_int = 0x0004; |
73 changes: 73 additions & 0 deletions
73
docker/test-base/patches/libc+armv7-unknown-linux-uclibceabihf.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs | ||
index 4afb98e95..67d5ba1b3 100644 | ||
--- a/src/unix/linux_like/linux/uclibc/mod.rs | ||
+++ b/src/unix/linux_like/linux/uclibc/mod.rs | ||
@@ -107,6 +107,68 @@ struct siginfo_si_value { | ||
} | ||
} | ||
|
||
+cfg_if! { | ||
+ if #[cfg(libc_union)] { | ||
+ // Internal, for casts to access union fields | ||
+ #[repr(C)] | ||
+ struct sifields_sigchld { | ||
+ si_pid: ::pid_t, | ||
+ si_uid: ::uid_t, | ||
+ si_status: ::c_int, | ||
+ si_utime: ::c_long, | ||
+ si_stime: ::c_long, | ||
+ } | ||
+ impl ::Copy for sifields_sigchld {} | ||
+ impl ::Clone for sifields_sigchld { | ||
+ fn clone(&self) -> sifields_sigchld { | ||
+ *self | ||
+ } | ||
+ } | ||
+ | ||
+ // Internal, for casts to access union fields | ||
+ #[repr(C)] | ||
+ union sifields { | ||
+ _align_pointer: *mut ::c_void, | ||
+ sigchld: sifields_sigchld, | ||
+ } | ||
+ | ||
+ // Internal, for casts to access union fields. Note that some variants | ||
+ // of sifields start with a pointer, which makes the alignment of | ||
+ // sifields vary on 32-bit and 64-bit architectures. | ||
+ #[repr(C)] | ||
+ struct siginfo_f { | ||
+ _siginfo_base: [::c_int; 3], | ||
+ sifields: sifields, | ||
+ } | ||
+ | ||
+ impl siginfo_t { | ||
+ unsafe fn sifields(&self) -> &sifields { | ||
+ &(*(self as *const siginfo_t as *const siginfo_f)).sifields | ||
+ } | ||
+ | ||
+ pub unsafe fn si_pid(&self) -> ::pid_t { | ||
+ self.sifields().sigchld.si_pid | ||
+ } | ||
+ | ||
+ pub unsafe fn si_uid(&self) -> ::uid_t { | ||
+ self.sifields().sigchld.si_uid | ||
+ } | ||
+ | ||
+ pub unsafe fn si_status(&self) -> ::c_int { | ||
+ self.sifields().sigchld.si_status | ||
+ } | ||
+ | ||
+ pub unsafe fn si_utime(&self) -> ::c_long { | ||
+ self.sifields().sigchld.si_utime | ||
+ } | ||
+ | ||
+ pub unsafe fn si_stime(&self) -> ::c_long { | ||
+ self.sifields().sigchld.si_stime | ||
+ } | ||
+ } | ||
+ } | ||
+} | ||
+ | ||
pub const MCL_CURRENT: ::c_int = 0x0001; | ||
pub const MCL_FUTURE: ::c_int = 0x0002; | ||
pub const MCL_ONFAULT: ::c_int = 0x0004; |
73 changes: 73 additions & 0 deletions
73
docker/test-base/patches/libc+mips-unknown-linux-uclibc.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs | ||
index 4afb98e95..67d5ba1b3 100644 | ||
--- a/src/unix/linux_like/linux/uclibc/mod.rs | ||
+++ b/src/unix/linux_like/linux/uclibc/mod.rs | ||
@@ -107,6 +107,68 @@ struct siginfo_si_value { | ||
} | ||
} | ||
|
||
+cfg_if! { | ||
+ if #[cfg(libc_union)] { | ||
+ // Internal, for casts to access union fields | ||
+ #[repr(C)] | ||
+ struct sifields_sigchld { | ||
+ si_pid: ::pid_t, | ||
+ si_uid: ::uid_t, | ||
+ si_status: ::c_int, | ||
+ si_utime: ::c_long, | ||
+ si_stime: ::c_long, | ||
+ } | ||
+ impl ::Copy for sifields_sigchld {} | ||
+ impl ::Clone for sifields_sigchld { | ||
+ fn clone(&self) -> sifields_sigchld { | ||
+ *self | ||
+ } | ||
+ } | ||
+ | ||
+ // Internal, for casts to access union fields | ||
+ #[repr(C)] | ||
+ union sifields { | ||
+ _align_pointer: *mut ::c_void, | ||
+ sigchld: sifields_sigchld, | ||
+ } | ||
+ | ||
+ // Internal, for casts to access union fields. Note that some variants | ||
+ // of sifields start with a pointer, which makes the alignment of | ||
+ // sifields vary on 32-bit and 64-bit architectures. | ||
+ #[repr(C)] | ||
+ struct siginfo_f { | ||
+ _siginfo_base: [::c_int; 3], | ||
+ sifields: sifields, | ||
+ } | ||
+ | ||
+ impl siginfo_t { | ||
+ unsafe fn sifields(&self) -> &sifields { | ||
+ &(*(self as *const siginfo_t as *const siginfo_f)).sifields | ||
+ } | ||
+ | ||
+ pub unsafe fn si_pid(&self) -> ::pid_t { | ||
+ self.sifields().sigchld.si_pid | ||
+ } | ||
+ | ||
+ pub unsafe fn si_uid(&self) -> ::uid_t { | ||
+ self.sifields().sigchld.si_uid | ||
+ } | ||
+ | ||
+ pub unsafe fn si_status(&self) -> ::c_int { | ||
+ self.sifields().sigchld.si_status | ||
+ } | ||
+ | ||
+ pub unsafe fn si_utime(&self) -> ::c_long { | ||
+ self.sifields().sigchld.si_utime | ||
+ } | ||
+ | ||
+ pub unsafe fn si_stime(&self) -> ::c_long { | ||
+ self.sifields().sigchld.si_stime | ||
+ } | ||
+ } | ||
+ } | ||
+} | ||
+ | ||
pub const MCL_CURRENT: ::c_int = 0x0001; | ||
pub const MCL_FUTURE: ::c_int = 0x0002; | ||
pub const MCL_ONFAULT: ::c_int = 0x0004; |
73 changes: 73 additions & 0 deletions
73
docker/test-base/patches/libc+mipsel-unknown-linux-uclibc.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs | ||
index 4afb98e95..67d5ba1b3 100644 | ||
--- a/src/unix/linux_like/linux/uclibc/mod.rs | ||
+++ b/src/unix/linux_like/linux/uclibc/mod.rs | ||
@@ -107,6 +107,68 @@ struct siginfo_si_value { | ||
} | ||
} | ||
|
||
+cfg_if! { | ||
+ if #[cfg(libc_union)] { | ||
+ // Internal, for casts to access union fields | ||
+ #[repr(C)] | ||
+ struct sifields_sigchld { | ||
+ si_pid: ::pid_t, | ||
+ si_uid: ::uid_t, | ||
+ si_status: ::c_int, | ||
+ si_utime: ::c_long, | ||
+ si_stime: ::c_long, | ||
+ } | ||
+ impl ::Copy for sifields_sigchld {} | ||
+ impl ::Clone for sifields_sigchld { | ||
+ fn clone(&self) -> sifields_sigchld { | ||
+ *self | ||
+ } | ||
+ } | ||
+ | ||
+ // Internal, for casts to access union fields | ||
+ #[repr(C)] | ||
+ union sifields { | ||
+ _align_pointer: *mut ::c_void, | ||
+ sigchld: sifields_sigchld, | ||
+ } | ||
+ | ||
+ // Internal, for casts to access union fields. Note that some variants | ||
+ // of sifields start with a pointer, which makes the alignment of | ||
+ // sifields vary on 32-bit and 64-bit architectures. | ||
+ #[repr(C)] | ||
+ struct siginfo_f { | ||
+ _siginfo_base: [::c_int; 3], | ||
+ sifields: sifields, | ||
+ } | ||
+ | ||
+ impl siginfo_t { | ||
+ unsafe fn sifields(&self) -> &sifields { | ||
+ &(*(self as *const siginfo_t as *const siginfo_f)).sifields | ||
+ } | ||
+ | ||
+ pub unsafe fn si_pid(&self) -> ::pid_t { | ||
+ self.sifields().sigchld.si_pid | ||
+ } | ||
+ | ||
+ pub unsafe fn si_uid(&self) -> ::uid_t { | ||
+ self.sifields().sigchld.si_uid | ||
+ } | ||
+ | ||
+ pub unsafe fn si_status(&self) -> ::c_int { | ||
+ self.sifields().sigchld.si_status | ||
+ } | ||
+ | ||
+ pub unsafe fn si_utime(&self) -> ::c_long { | ||
+ self.sifields().sigchld.si_utime | ||
+ } | ||
+ | ||
+ pub unsafe fn si_stime(&self) -> ::c_long { | ||
+ self.sifields().sigchld.si_stime | ||
+ } | ||
+ } | ||
+ } | ||
+} | ||
+ | ||
pub const MCL_CURRENT: ::c_int = 0x0001; | ||
pub const MCL_FUTURE: ::c_int = 0x0002; | ||
pub const MCL_ONFAULT: ::c_int = 0x0004; |