Skip to content

Commit 763ae06

Browse files
wesleywisermyl7
authored andcommitted
Update mips to musl 1.2.3
1 parent 0ee154e commit 763ae06

File tree

3 files changed

+43
-43
lines changed

3 files changed

+43
-43
lines changed

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

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,15 @@ pub const SO_RCVLOWAT: ::c_int = 0x1004;
3333
// NOTE: These definitions are now being renamed with _OLD postfix,
3434
// but CI haven't support them yet.
3535
// Some related consts could be found in b32.rs and b64.rs
36-
pub const SO_SNDTIMEO: ::c_int = 0x1005;
37-
pub const SO_RCVTIMEO: ::c_int = 0x1006;
36+
cfg_if! {
37+
if #[cfg(target_env = "musl")] {
38+
pub const SO_SNDTIMEO: ::c_int = 0x43;
39+
pub const SO_RCVTIMEO: ::c_int = 0x42;
40+
} else {
41+
pub const SO_SNDTIMEO: ::c_int = 0x1005;
42+
pub const SO_RCVTIMEO: ::c_int = 0x1006;
43+
}
44+
}
3845
// pub const SO_SNDTIMEO_OLD: ::c_int = 0x1005;
3946
// pub const SO_RCVTIMEO_OLD: ::c_int = 0x1006;
4047
pub const SO_ACCEPTCONN: ::c_int = 0x1009;
@@ -88,9 +95,17 @@ pub const SO_BINDTOIFINDEX: ::c_int = 62;
8895
// NOTE: These definitions are now being renamed with _OLD postfix,
8996
// but CI haven't support them yet.
9097
// Some related consts could be found in b32.rs and b64.rs
91-
pub const SO_TIMESTAMP: ::c_int = 29;
92-
pub const SO_TIMESTAMPNS: ::c_int = 35;
93-
pub const SO_TIMESTAMPING: ::c_int = 37;
98+
cfg_if! {
99+
if #[cfg(target_env = "musl")] {
100+
pub const SO_TIMESTAMP: ::c_int = 63;
101+
pub const SO_TIMESTAMPNS: ::c_int = 64;
102+
pub const SO_TIMESTAMPING: ::c_int = 65;
103+
} else {
104+
pub const SO_TIMESTAMP: ::c_int = 29;
105+
pub const SO_TIMESTAMPNS: ::c_int = 35;
106+
pub const SO_TIMESTAMPING: ::c_int = 37;
107+
}
108+
}
94109
// pub const SO_TIMESTAMP_OLD: ::c_int = 29;
95110
// pub const SO_TIMESTAMPNS_OLD: ::c_int = 35;
96111
// pub const SO_TIMESTAMPING_OLD: ::c_int = 37;
@@ -287,10 +302,7 @@ cfg_if! {
287302
pub const RLIMIT_NICE: ::c_int = 13;
288303
pub const RLIMIT_RTPRIO: ::c_int = 14;
289304
pub const RLIMIT_RTTIME: ::c_int = 15;
290-
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
291-
pub const RLIM_NLIMITS: ::c_int = 15;
292-
#[allow(deprecated)]
293-
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
305+
pub const RLIM_NLIMITS: ::c_int = 16;
294306
pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS;
295307
pub const RLIM_INFINITY: ::rlim_t = !0;
296308
}

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

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,9 @@ s! {
2323
pub st_blksize: ::blksize_t,
2424
__st_padding3: ::c_long,
2525
pub st_blocks: ::blkcnt_t,
26-
pub st_atime: ::time_t,
27-
pub st_atime_nsec: ::c_long,
28-
__st_atime_nsec_padding: ::c_long,
29-
pub st_mtime: ::time_t,
30-
pub st_mtime_nsec: ::c_long,
31-
__st_mtime_nsec_padding: ::c_long,
32-
pub st_ctime: ::time_t,
33-
pub st_ctime_nsec: ::c_long,
34-
__st_ctime_nsec_padding: ::c_long,
26+
pub st_atim: ::timespec,
27+
pub st_mtim: ::timespec,
28+
pub st_ctim: ::timespec,
3529
__st_padding4: [::c_long; 2],
3630
}
3731

@@ -56,40 +50,32 @@ s! {
5650
pub struct shmid_ds {
5751
pub shm_perm: ::ipc_perm,
5852
pub shm_segsz: ::size_t,
59-
pub shm_atime: ::time_t,
60-
pub shm_dtime: ::time_t,
61-
pub shm_ctime: ::time_t,
53+
__shm_atime_lo: ::c_ulong,
54+
__shm_dtime_lo: ::c_ulong,
55+
__shm_ctime_lo: ::c_ulong,
6256
pub shm_cpid: ::pid_t,
6357
pub shm_lpid: ::pid_t,
6458
pub shm_nattch: ::c_ulong,
65-
__pad1: ::c_ulong,
66-
__pad2: ::c_ulong,
59+
__shm_atime_hi: ::c_ushort,
60+
__shm_dtime_hi: ::c_ushort,
61+
__shm_ctime_hi: ::c_ushort,
62+
pub shm_atime: ::time_t,
63+
pub shm_dtime: ::time_t,
64+
pub shm_ctime: ::time_t,
6765
}
6866

6967
pub struct msqid_ds {
7068
pub msg_perm: ::ipc_perm,
71-
#[cfg(target_endian = "big")]
72-
__unused1: ::c_int,
73-
pub msg_stime: ::time_t,
74-
#[cfg(target_endian = "little")]
75-
__unused1: ::c_int,
76-
#[cfg(target_endian = "big")]
77-
__unused2: ::c_int,
78-
pub msg_rtime: ::time_t,
79-
#[cfg(target_endian = "little")]
80-
__unused2: ::c_int,
81-
#[cfg(target_endian = "big")]
82-
__unused3: ::c_int,
83-
pub msg_ctime: ::time_t,
84-
#[cfg(target_endian = "little")]
85-
__unused3: ::c_int,
86-
__msg_cbytes: ::c_ulong,
69+
__unused_msg_time: [::c_ulong; 6],
70+
pub msg_cbytes: ::c_ulong,
8771
pub msg_qnum: ::msgqnum_t,
8872
pub msg_qbytes: ::msglen_t,
8973
pub msg_lspid: ::pid_t,
9074
pub msg_lrpid: ::pid_t,
91-
__pad1: ::c_ulong,
92-
__pad2: ::c_ulong,
75+
__unused: [::c_ulong; 2],
76+
pub msg_stime: ::time_t,
77+
pub msg_rtime: ::time_t,
78+
pub msg_ctime: ::time_t,
9379
}
9480

9581
pub struct statfs {
@@ -359,7 +345,7 @@ pub const SIGTSTP: ::c_int = 24;
359345
pub const SIGURG: ::c_int = 21;
360346
pub const SIGIO: ::c_int = 22;
361347
pub const SIGSYS: ::c_int = 12;
362-
pub const SIGSTKFLT: ::c_int = 7;
348+
//pub const SIGSTKFLT: ::c_int = 7;
363349
pub const SIGPOLL: ::c_int = ::SIGIO;
364350
pub const SIGPWR: ::c_int = 19;
365351
pub const SIG_SETMASK: ::c_int = 3;

src/unix/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,13 @@ s! {
6969
// See https://sourceware.org/bugzilla/show_bug.cgi?id=16437
7070
pub struct timespec {
7171
pub tv_sec: time_t,
72+
#[cfg(all(musl_time64_abi, target_endian = "big"))]
73+
__pad0: u32,
7274
#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
7375
pub tv_nsec: i64,
7476
#[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
7577
pub tv_nsec: ::c_long,
76-
#[cfg(musl_time64_abi)]
78+
#[cfg(all(musl_time64_abi, target_endian = "little"))]
7779
__pad0: u32
7880
}
7981

0 commit comments

Comments
 (0)