Skip to content

Commit a066096

Browse files
xbjfktgross35
authored andcommitted
musl: aarch64: update type of ipc_perm->__seq to match upstream
The architecture-specific definitions was removed in upstream commit 319b2d0, changing the type to the generic definition of int. (backport <rust-lang#4443>) (cherry picked from commit 3f91173)
1 parent 53a99ed commit a066096

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

libc-test/build.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3722,7 +3722,6 @@ fn test_linux(target: &str) {
37223722
let x32 = target.contains("x32");
37233723
let x86_32 = target.contains("i686");
37243724
let x86_64 = target.contains("x86_64");
3725-
let aarch64_musl = aarch64 && musl;
37263725
let gnueabihf = target.contains("gnueabihf");
37273726
let x86_64_gnux32 = target.contains("gnux32") && x86_64;
37283727
let riscv64 = target.contains("riscv64");
@@ -4856,8 +4855,8 @@ fn test_linux(target: &str) {
48564855
"sched_ss_init_budget",
48574856
"sched_ss_max_repl",
48584857
].contains(&field) && musl) ||
4859-
// FIXME(musl): After musl 1.1.24, the type becomes `int` instead of `unsigned short`.
4860-
(struct_ == "ipc_perm" && field == "__seq" && aarch64_musl) ||
4858+
// After musl 1.1.24, the type becomes `int` instead of `unsigned short`.
4859+
(struct_ == "ipc_perm" && field == "__seq" && old_musl && aarch64) ||
48614860
// glibc uses unnamed fields here and Rust doesn't support that yet
48624861
(struct_ == "timex" && field.starts_with("__unused")) ||
48634862
// FIXME(linux): It now takes mode_t since glibc 2.31 on some targets.

src/unix/linux_like/linux/musl/b64/aarch64/mod.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,18 @@ s! {
7474
pub cuid: crate::uid_t,
7575
pub cgid: crate::gid_t,
7676
pub mode: crate::mode_t,
77+
78+
#[cfg(musl_v1_2_3)]
79+
pub __seq: c_int,
80+
#[cfg(not(musl_v1_2_3))]
81+
#[deprecated(
82+
since = "0.2.173",
83+
note = "The type of this field has changed from c_ushort to c_int,
84+
we'll follow that change in the future release."
85+
)]
7786
pub __seq: c_ushort,
78-
__unused1: c_ulong,
79-
__unused2: c_ulong,
87+
__unused1: c_long,
88+
__unused2: c_long,
8089
}
8190

8291
pub struct ucontext_t {

0 commit comments

Comments
 (0)