diff --git a/ci/install-musl.sh b/ci/install-musl.sh index 54fd343f07b37..dcdbb07a8f273 100644 --- a/ci/install-musl.sh +++ b/ci/install-musl.sh @@ -5,7 +5,7 @@ set -ex -MUSL_VERSION=1.1.24 +MUSL_VERSION=1.2.2 MUSL="musl-${MUSL_VERSION}" # Download, configure, build, and install musl: diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs index 5331a28bf0b94..3df6a9c4e0a96 100644 --- a/src/unix/linux_like/linux/musl/mod.rs +++ b/src/unix/linux_like/linux/musl/mod.rs @@ -1,15 +1,6 @@ pub type pthread_t = *mut ::c_void; pub type clock_t = c_long; -#[cfg_attr( - not(feature = "rustc-dep-of-std"), - deprecated( - since = "0.2.80", - note = "This type is changed to 64-bit in musl 1.2.0, \ - we'll follow that change in the future release. \ - See #1848 for more info." - ) -)] -pub type time_t = c_long; +pub type time_t = i64; pub type suseconds_t = c_long; pub type ino_t = u64; pub type off_t = i64; @@ -269,14 +260,9 @@ s_no_extra_traits! { pub __reserved: [::c_char; 256], } - // FIXME: musl added paddings and adjusted - // layout in 1.2.0 but our CI is still 1.1.24. - // So, I'm leaving some fields as comments for now. - // ref. https://github.com/bminor/musl/commit/ - // 1e7f0fcd7ff2096904fd93a2ee6d12a2392be392 pub struct utmpx { pub ut_type: ::c_short, - //__ut_pad1: ::c_short, + __ut_pad1: ::c_short, pub ut_pid: ::pid_t, pub ut_line: [::c_char; 32], pub ut_id: [::c_char; 4], @@ -284,15 +270,15 @@ s_no_extra_traits! { pub ut_host: [::c_char; 256], pub ut_exit: __exit_status, - //#[cfg(target_endian = "little")] - pub ut_session: ::c_long, - //#[cfg(target_endian = "little")] - //__ut_pad2: ::c_long, + #[cfg(target_endian = "little")] + pub ut_session: ::c_int, + #[cfg(target_endian = "little")] + __ut_pad2: ::c_int, - //#[cfg(not(target_endian = "little"))] - //__ut_pad2: ::c_int, - //#[cfg(not(target_endian = "little"))] - //pub ut_session: ::c_int, + #[cfg(not(target_endian = "little"))] + __ut_pad2: ::c_int, + #[cfg(not(target_endian = "little"))] + pub ut_session: ::c_int, pub ut_tv: ::timeval, pub ut_addr_v6: [::c_uint; 4],