Skip to content

Commit 32de074

Browse files
wesleywisermyl7
authored andcommitted
Update x86 musl to 1.2.3
1 parent 1361944 commit 32de074

File tree

5 files changed

+63
-30
lines changed

5 files changed

+63
-30
lines changed

src/unix/linux_like/linux/arch/generic/mod.rs

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,25 @@ pub const SO_PASSCRED: ::c_int = 16;
3737
pub const SO_PEERCRED: ::c_int = 17;
3838
pub const SO_RCVLOWAT: ::c_int = 18;
3939
pub const SO_SNDLOWAT: ::c_int = 19;
40-
pub const SO_RCVTIMEO: ::c_int = 20;
41-
pub const SO_SNDTIMEO: ::c_int = 21;
40+
41+
cfg_if! {
42+
if #[cfg(not(musl_time64_abi))] {
43+
pub const SO_RCVTIMEO: ::c_int = 20;
44+
pub const SO_SNDTIMEO: ::c_int = 21;
45+
pub const SO_TIMESTAMP: ::c_int = 29;
46+
pub const SO_TIMESTAMPNS: ::c_int = 35;
47+
pub const SO_TIMESTAMPING: ::c_int = 37;
48+
pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
49+
} else {
50+
pub const SO_RCVTIMEO: ::c_int = 66;
51+
pub const SO_SNDTIMEO: ::c_int = 67;
52+
pub const SO_TIMESTAMP: ::c_int = 63;
53+
pub const SO_TIMESTAMPNS: ::c_int = 64;
54+
pub const SO_TIMESTAMPING: ::c_int = 65;
55+
pub const SCM_TIMESTAMPING: ::c_int = 65;
56+
}
57+
}
58+
4259
// pub const SO_RCVTIMEO_OLD: ::c_int = 20;
4360
// pub const SO_SNDTIMEO_OLD: ::c_int = 21;
4461
pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
@@ -49,17 +66,14 @@ pub const SO_ATTACH_FILTER: ::c_int = 26;
4966
pub const SO_DETACH_FILTER: ::c_int = 27;
5067
pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
5168
pub const SO_PEERNAME: ::c_int = 28;
52-
pub const SO_TIMESTAMP: ::c_int = 29;
5369
// pub const SO_TIMESTAMP_OLD: ::c_int = 29;
5470
pub const SO_ACCEPTCONN: ::c_int = 30;
5571
pub const SO_PEERSEC: ::c_int = 31;
5672
pub const SO_SNDBUFFORCE: ::c_int = 32;
5773
pub const SO_RCVBUFFORCE: ::c_int = 33;
5874
pub const SO_PASSSEC: ::c_int = 34;
59-
pub const SO_TIMESTAMPNS: ::c_int = 35;
6075
// pub const SO_TIMESTAMPNS_OLD: ::c_int = 35;
6176
pub const SO_MARK: ::c_int = 36;
62-
pub const SO_TIMESTAMPING: ::c_int = 37;
6377
// pub const SO_TIMESTAMPING_OLD: ::c_int = 37;
6478
pub const SO_PROTOCOL: ::c_int = 38;
6579
pub const SO_DOMAIN: ::c_int = 39;
@@ -126,7 +140,6 @@ cfg_if! {
126140
// Defined in unix/linux_like/mod.rs
127141
// pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
128142
pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
129-
pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
130143

131144
// Ioctl Constants
132145

@@ -311,10 +324,7 @@ cfg_if! {
311324
pub const RLIMIT_NICE: ::c_int = 13;
312325
pub const RLIMIT_RTPRIO: ::c_int = 14;
313326
pub const RLIMIT_RTTIME: ::c_int = 15;
314-
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
315-
pub const RLIM_NLIMITS: ::c_int = 15;
316-
#[allow(deprecated)]
317-
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
327+
pub const RLIM_NLIMITS: ::c_int = 16;
318328
pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS;
319329
}
320330
}

src/unix/linux_like/linux/musl/b32/x86/mod.rs

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,34 +55,40 @@ s! {
5555
pub struct shmid_ds {
5656
pub shm_perm: ::ipc_perm,
5757
pub shm_segsz: ::size_t,
58-
pub shm_atime: ::time_t,
59-
__unused1: ::c_int,
60-
pub shm_dtime: ::time_t,
61-
__unused2: ::c_int,
62-
pub shm_ctime: ::time_t,
63-
__unused3: ::c_int,
58+
__shm_atime_lo: ::c_ulong,
59+
__shm_atime_hi: ::c_ulong,
60+
__shm_dtime_lo: ::c_ulong,
61+
__shm_dtime_hi: ::c_ulong,
62+
__shm_ctime_lo: ::c_ulong,
63+
__shm_ctime_hi: ::c_ulong,
6464
pub shm_cpid: ::pid_t,
6565
pub shm_lpid: ::pid_t,
6666
pub shm_nattch: ::c_ulong,
6767
__pad1: ::c_ulong,
6868
__pad2: ::c_ulong,
69+
__pad3: ::c_ulong,
70+
pub shm_atime: ::time_t,
71+
pub shm_dtime: ::time_t,
72+
pub shm_ctime: ::time_t,
6973
}
7074

7175
pub struct msqid_ds {
7276
pub msg_perm: ::ipc_perm,
73-
pub msg_stime: ::time_t,
74-
__unused1: ::c_int,
75-
pub msg_rtime: ::time_t,
76-
__unused2: ::c_int,
77-
pub msg_ctime: ::time_t,
78-
__unused3: ::c_int,
79-
__msg_cbytes: ::c_ulong,
77+
__msg_stime_lo: ::c_ulong,
78+
__msg_stime_hi: ::c_ulong,
79+
__msg_rtime_lo: ::c_ulong,
80+
__msg_rtime_hi: ::c_ulong,
81+
__msg_ctime_lo: ::c_ulong,
82+
__msg_ctime_hi: ::c_ulong,
83+
pub msg_cbytes: ::c_ulong,
8084
pub msg_qnum: ::msgqnum_t,
8185
pub msg_qbytes: ::msglen_t,
8286
pub msg_lspid: ::pid_t,
8387
pub msg_lrpid: ::pid_t,
84-
__pad1: ::c_ulong,
85-
__pad2: ::c_ulong,
88+
__unused: [::c_ulong; 2],
89+
pub msg_stime: ::time_t,
90+
pub msg_rtime: ::time_t,
91+
pub msg_ctime: ::time_t,
8692
}
8793

8894
pub struct statfs {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pub type pthread_t = *mut ::c_void;
22
pub type clock_t = c_long;
33
pub type time_t = i64;
4-
pub type suseconds_t = c_long;
4+
pub type suseconds_t = i64;
55
pub type ino_t = u64;
66
pub type off_t = i64;
77
pub type blkcnt_t = i64;

src/unix/linux_like/mod.rs

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,28 @@ s! {
104104

105105
pub struct sched_param {
106106
pub sched_priority: ::c_int,
107-
#[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))]
107+
#[cfg(target_env = "musl")]
108+
__reserved1: ::c_int,
109+
#[cfg(target_os = "emscripten")]
108110
pub sched_ss_low_priority: ::c_int,
109-
#[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))]
111+
#[cfg(target_os = "emscripten")]
110112
pub sched_ss_repl_period: ::timespec,
111-
#[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))]
113+
#[cfg(target_os = "emscripten")]
112114
pub sched_ss_init_budget: ::timespec,
113-
#[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))]
115+
#[cfg(target_os = "emscripten")]
114116
pub sched_ss_max_repl: ::c_int,
117+
#[cfg(musl_time64_abi)]
118+
__reserved2: [::c_long; 4],
119+
#[cfg(all(target_env = "musl", not(musl_time64_abi)))]
120+
__reserved2_1: time_t,
121+
#[cfg(all(target_env = "musl", not(musl_time64_abi)))]
122+
__reserved2_2: ::c_long,
123+
#[cfg(all(target_env = "musl", not(musl_time64_abi)))]
124+
__reserved2_3: time_t,
125+
#[cfg(all(target_env = "musl", not(musl_time64_abi)))]
126+
__reserved2_4: ::c_long,
127+
#[cfg(target_env = "musl")]
128+
__reserved3: ::c_int,
115129
}
116130

117131
pub struct Dl_info {

src/unix/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ s! {
7373
pub tv_nsec: i64,
7474
#[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
7575
pub tv_nsec: ::c_long,
76+
#[cfg(musl_time64_abi)]
77+
__pad0: u32
7678
}
7779

7880
pub struct rlimit {
@@ -1376,6 +1378,7 @@ cfg_if! {
13761378
target_os = "haiku",
13771379
target_os = "nto")))] {
13781380
extern "C" {
1381+
#[cfg_attr(musl_time64_abi, link_name = "__adjtime64")]
13791382
pub fn adjtime(delta: *const timeval, olddelta: *mut timeval) -> ::c_int;
13801383
}
13811384
}

0 commit comments

Comments
 (0)