Skip to content

Commit d148860

Browse files
authored
Merge pull request #4266 from tgross35/backport-shiitake
[0.2] Backports
2 parents 30309eb + 42cd7e1 commit d148860

File tree

44 files changed

+172
-94
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+172
-94
lines changed

.cirrus.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,22 @@ task:
33
env:
44
HOME: /tmp # cargo cache needs it
55
TARGET: x86_64-unknown-freebsd
6+
# FIXME(freebsd): FreeBSD has a segfault when `RUST_BACKTRACE` is set
7+
# https://github.com/rust-lang/rust/issues/132185
8+
RUST_BACKTRACE: "0"
69
matrix:
710
- name: nightly freebsd-13 i686
811
# Test i686 FreeBSD in 32-bit emulation on a 64-bit host.
912
env:
1013
TARGET: i686-unknown-freebsd
1114
freebsd_instance:
12-
image_family: freebsd-13-3
15+
image_family: freebsd-13-4
1316
- name: nightly freebsd-13 x86_64
1417
freebsd_instance:
15-
image_family: freebsd-13-3
18+
image_family: freebsd-13-4
1619
- name: nightly freebsd-14 x86_64
1720
freebsd_instance:
18-
image: freebsd-14-1-release-amd64-ufs
21+
image: freebsd-14-2-release-amd64-ufs
1922
- name: nightly freebsd-15 x86_64
2023
freebsd_instance:
2124
image_family: freebsd-15-0-snap

.github/workflows/ci.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ jobs:
136136
- i686-unknown-linux-musl
137137
- loongarch64-unknown-linux-gnu
138138
- loongarch64-unknown-linux-musl
139-
- powerpc-unknown-linux-gnu
139+
# FIXME(ppc): SIGILL running tests, see
140+
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
141+
# - powerpc-unknown-linux-gnu
140142
- powerpc64-unknown-linux-gnu
141143
- powerpc64le-unknown-linux-gnu
142144
- riscv64gc-unknown-linux-gnu

libc-test/build.rs

+3
Original file line numberDiff line numberDiff line change
@@ -2140,6 +2140,9 @@ fn test_android(target: &str) {
21402140
// Added in API level 26, but some tests use level 24.
21412141
"endgrent" => true,
21422142

2143+
// Added in API level 26, but some tests use level 24.
2144+
"getdomainname" | "setdomainname" => true,
2145+
21432146
// FIXME: bad function pointers:
21442147
"isalnum" | "isalpha" | "iscntrl" | "isdigit" | "isgraph" | "islower" | "isprint"
21452148
| "ispunct" | "isspace" | "isupper" | "isxdigit" | "isblank" | "tolower"

libc-test/semver/android.txt

+2
Original file line numberDiff line numberDiff line change
@@ -3324,6 +3324,7 @@ getaddrinfo
33243324
getchar
33253325
getchar_unlocked
33263326
getcwd
3327+
getdomainname
33273328
getegid
33283329
getenv
33293330
geteuid
@@ -3720,6 +3721,7 @@ sendmsg
37203721
sendto
37213722
servent
37223723
setbuf
3724+
setdomainname
37233725
setegid
37243726
setenv
37253727
seteuid

libc-test/semver/linux-musl.txt

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ AIO_ALLDONE
55
AIO_CANCELED
66
AIO_NOTCANCELED
77
BOOT_TIME
8+
CLONE_NEWTIME
89
DEAD_PROCESS
910
EMPTY
1011
Elf32_Chdr

src/macros.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ cfg_if! {
243243
)*) => ($(
244244
#[inline]
245245
$(#[$attr])*
246-
pub $($constness)* unsafe extern fn $i($($arg: $argty),*) -> $ret
246+
pub $($constness)* unsafe extern "C" fn $i($($arg: $argty),*) -> $ret
247247
$body
248248
)*)
249249
}
@@ -257,7 +257,7 @@ cfg_if! {
257257
)*) => ($(
258258
#[inline]
259259
$(#[$attr])*
260-
pub $($constness)* extern fn $i($($arg: $argty),*) -> $ret
260+
pub $($constness)* extern "C" fn $i($($arg: $argty),*) -> $ret
261261
$body
262262
)*)
263263
}
@@ -285,7 +285,7 @@ cfg_if! {
285285
)*) => ($(
286286
#[inline]
287287
$(#[$attr])*
288-
pub unsafe extern fn $i($($arg: $argty),*) -> $ret
288+
pub unsafe extern "C" fn $i($($arg: $argty),*) -> $ret
289289
$body
290290
)*)
291291
}
@@ -299,7 +299,7 @@ cfg_if! {
299299
)*) => ($(
300300
#[inline]
301301
$(#[$attr])*
302-
pub extern fn $i($($arg: $argty),*) -> $ret
302+
pub extern "C" fn $i($($arg: $argty),*) -> $ret
303303
$body
304304
)*)
305305
}

src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ s! {
266266
pub st_blksize: crate::blksize_t,
267267
pub st_flags: crate::fflags_t,
268268
pub st_gen: u64,
269-
pub st_spare: [u64; 10],
269+
pub st_filerev: u64,
270+
pub st_spare: [u64; 9],
270271
}
271272
}
272273

src/unix/hurd/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ pub type nl_item = c_int;
226226
pub type iconv_t = *mut c_void;
227227

228228
#[cfg_attr(feature = "extra_traits", derive(Debug))]
229-
pub enum fpos64_t {} // FIXME: fill this out with a struct
229+
pub enum fpos64_t {} // FIXME(hurd): fill this out with a struct
230230
impl Copy for fpos64_t {}
231231
impl Clone for fpos64_t {
232232
fn clone(&self) -> fpos64_t {
@@ -814,7 +814,7 @@ s! {
814814
pub ifa_flags: c_uint,
815815
pub ifa_addr: *mut crate::sockaddr,
816816
pub ifa_netmask: *mut crate::sockaddr,
817-
pub ifa_ifu: *mut crate::sockaddr, // FIXME This should be a union
817+
pub ifa_ifu: *mut crate::sockaddr, // FIXME(union) This should be a union
818818
pub ifa_data: *mut c_void,
819819
}
820820

@@ -1092,7 +1092,7 @@ cfg_if! {
10921092
.field("ut_line", &self.ut_line)
10931093
.field("ut_id", &self.ut_id)
10941094
.field("ut_user", &self.ut_user)
1095-
// FIXME: .field("ut_host", &self.ut_host)
1095+
// FIXME(debug): .field("ut_host", &self.ut_host)
10961096
.field("ut_exit", &self.ut_exit)
10971097
.field("ut_session", &self.ut_session)
10981098
.field("ut_tv", &self.ut_tv)

src/unix/linux_like/android/b32/x86/mod.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,11 @@ pub const SYS_modify_ldt: c_long = 123;
268268
pub const SYS_adjtimex: c_long = 124;
269269
pub const SYS_mprotect: c_long = 125;
270270
pub const SYS_sigprocmask: c_long = 126;
271+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
271272
pub const SYS_create_module: c_long = 127;
272273
pub const SYS_init_module: c_long = 128;
273274
pub const SYS_delete_module: c_long = 129;
275+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
274276
pub const SYS_get_kernel_syms: c_long = 130;
275277
pub const SYS_quotactl: c_long = 131;
276278
pub const SYS_getpgid: c_long = 132;
@@ -281,11 +283,11 @@ pub const SYS_personality: c_long = 136;
281283
pub const SYS_afs_syscall: c_long = 137;
282284
pub const SYS_setfsuid: c_long = 138;
283285
pub const SYS_setfsgid: c_long = 139;
284-
// FIXME: SYS__llseek is in the NDK sources but for some reason is
286+
// FIXME(android): SYS__llseek is in the NDK sources but for some reason is
285287
// not available in the tests
286288
// pub const SYS__llseek: c_long = 140;
287289
pub const SYS_getdents: c_long = 141;
288-
// FIXME: SYS__newselect is in the NDK sources but for some reason is
290+
// FIXME(android): SYS__newselect is in the NDK sources but for some reason is
289291
// not available in the tests
290292
// pub const SYS__newselect: c_long = 142;
291293
pub const SYS_flock: c_long = 143;
@@ -294,7 +296,7 @@ pub const SYS_readv: c_long = 145;
294296
pub const SYS_writev: c_long = 146;
295297
pub const SYS_getsid: c_long = 147;
296298
pub const SYS_fdatasync: c_long = 148;
297-
// FIXME: SYS__llseek is in the NDK sources but for some reason is
299+
// FIXME(android): SYS__llseek is in the NDK sources but for some reason is
298300
// not available in the tests
299301
// pub const SYS__sysctl: c_long = 149;
300302
pub const SYS_mlock: c_long = 150;
@@ -314,6 +316,7 @@ pub const SYS_mremap: c_long = 163;
314316
pub const SYS_setresuid: c_long = 164;
315317
pub const SYS_getresuid: c_long = 165;
316318
pub const SYS_vm86: c_long = 166;
319+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
317320
pub const SYS_query_module: c_long = 167;
318321
pub const SYS_poll: c_long = 168;
319322
pub const SYS_nfsservctl: c_long = 169;

src/unix/linux_like/android/b64/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ cfg_if! {
161161
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
162162
f.debug_struct("pthread_mutex_t")
163163
.field("value", &self.value)
164-
// FIXME: .field("__reserved", &self.__reserved)
164+
// FIXME(debug): .field("__reserved", &self.__reserved)
165165
.finish()
166166
}
167167
}
@@ -190,7 +190,7 @@ cfg_if! {
190190
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
191191
f.debug_struct("pthread_cond_t")
192192
.field("value", &self.value)
193-
// FIXME: .field("__reserved", &self.__reserved)
193+
// FIXME(debug): .field("__reserved", &self.__reserved)
194194
.finish()
195195
}
196196
}
@@ -227,7 +227,7 @@ cfg_if! {
227227
.field("pendingReaders", &self.pendingReaders)
228228
.field("pendingWriters", &self.pendingWriters)
229229
.field("attr", &self.attr)
230-
// FIXME: .field("__reserved", &self.__reserved)
230+
// FIXME(debug): .field("__reserved", &self.__reserved)
231231
.finish()
232232
}
233233
}

src/unix/linux_like/android/b64/x86_64/mod.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ cfg_if! {
353353
.field("mxcsr", &self.mxcsr)
354354
.field("mxcr_mask", &self.mxcr_mask)
355355
.field("st_space", &self.st_space)
356-
// FIXME: .field("xmm_space", &self.xmm_space)
356+
// FIXME(debug): .field("xmm_space", &self.xmm_space)
357357
// Ignore padding field
358358
.finish()
359359
}
@@ -545,7 +545,7 @@ pub const SYS_munlockall: c_long = 152;
545545
pub const SYS_vhangup: c_long = 153;
546546
pub const SYS_modify_ldt: c_long = 154;
547547
pub const SYS_pivot_root: c_long = 155;
548-
// FIXME: SYS__sysctl is in the NDK sources but for some reason is
548+
// FIXME(android): SYS__sysctl is in the NDK sources but for some reason is
549549
// not available in the tests
550550
// pub const SYS__sysctl: c_long = 156;
551551
pub const SYS_prctl: c_long = 157;
@@ -565,10 +565,13 @@ pub const SYS_sethostname: c_long = 170;
565565
pub const SYS_setdomainname: c_long = 171;
566566
pub const SYS_iopl: c_long = 172;
567567
pub const SYS_ioperm: c_long = 173;
568+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
568569
pub const SYS_create_module: c_long = 174;
569570
pub const SYS_init_module: c_long = 175;
570571
pub const SYS_delete_module: c_long = 176;
572+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
571573
pub const SYS_get_kernel_syms: c_long = 177;
574+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
572575
pub const SYS_query_module: c_long = 178;
573576
pub const SYS_quotactl: c_long = 179;
574577
pub const SYS_nfsservctl: c_long = 180;

src/unix/linux_like/android/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ cfg_if! {
699699
.field("d_off", &self.d_off)
700700
.field("d_reclen", &self.d_reclen)
701701
.field("d_type", &self.d_type)
702-
// FIXME: .field("d_name", &self.d_name)
702+
// FIXME(debug): .field("d_name", &self.d_name)
703703
.finish()
704704
}
705705
}
@@ -737,7 +737,7 @@ cfg_if! {
737737
.field("d_off", &self.d_off)
738738
.field("d_reclen", &self.d_reclen)
739739
.field("d_type", &self.d_type)
740-
// FIXME: .field("d_name", &self.d_name)
740+
// FIXME(debug): .field("d_name", &self.d_name)
741741
.finish()
742742
}
743743
}
@@ -809,7 +809,7 @@ cfg_if! {
809809
f.debug_struct("lastlog")
810810
.field("ll_time", &self.ll_time)
811811
.field("ll_line", &self.ll_line)
812-
// FIXME: .field("ll_host", &self.ll_host)
812+
// FIXME(debug): .field("ll_host", &self.ll_host)
813813
.finish()
814814
}
815815
}
@@ -860,7 +860,7 @@ cfg_if! {
860860
.field("ut_line", &self.ut_line)
861861
.field("ut_id", &self.ut_id)
862862
.field("ut_user", &self.ut_user)
863-
// FIXME: .field("ut_host", &self.ut_host)
863+
// FIXME(debug): .field("ut_host", &self.ut_host)
864864
.field("ut_exit", &self.ut_exit)
865865
.field("ut_session", &self.ut_session)
866866
.field("ut_tv", &self.ut_tv)

src/unix/linux_like/emscripten/mod.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub type statvfs64 = crate::statvfs;
4444
pub type dirent64 = crate::dirent;
4545

4646
#[cfg_attr(feature = "extra_traits", derive(Debug))]
47-
pub enum fpos64_t {} // FIXME: fill this out with a struct
47+
pub enum fpos64_t {} // FIXME(emscripten): fill this out with a struct
4848
impl Copy for fpos64_t {}
4949
impl Clone for fpos64_t {
5050
fn clone(&self) -> fpos64_t {
@@ -412,7 +412,7 @@ cfg_if! {
412412
.field("d_off", &self.d_off)
413413
.field("d_reclen", &self.d_reclen)
414414
.field("d_type", &self.d_type)
415-
// FIXME: .field("d_name", &self.d_name)
415+
// FIXME(debug): .field("d_name", &self.d_name)
416416
.finish()
417417
}
418418
}
@@ -465,7 +465,7 @@ cfg_if! {
465465
.field("totalhigh", &self.totalhigh)
466466
.field("freehigh", &self.freehigh)
467467
.field("mem_unit", &self.mem_unit)
468-
// FIXME: .field("__reserved", &self.__reserved)
468+
// FIXME(debug): .field("__reserved", &self.__reserved)
469469
.finish()
470470
}
471471
}
@@ -525,7 +525,7 @@ cfg_if! {
525525
impl fmt::Debug for pthread_cond_t {
526526
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
527527
f.debug_struct("pthread_cond_t")
528-
// FIXME: .field("size", &self.size)
528+
// FIXME(debug): .field("size", &self.size)
529529
.finish()
530530
}
531531
}
@@ -1574,8 +1574,6 @@ extern "C" {
15741574
pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int;
15751575
pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char;
15761576

1577-
pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int;
1578-
pub fn setdomainname(name: *const c_char, len: size_t) -> c_int;
15791577
pub fn sendmmsg(
15801578
sockfd: c_int,
15811579
msgvec: *mut crate::mmsghdr,

src/unix/linux_like/linux/gnu/b32/m68k/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -548,9 +548,11 @@ pub const SYS_cacheflush: c_long = 123;
548548
pub const SYS_adjtimex_time32: c_long = 124;
549549
pub const SYS_mprotect: c_long = 125;
550550
pub const SYS_sigprocmask: c_long = 126;
551+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
551552
pub const SYS_create_module: c_long = 127;
552553
pub const SYS_init_module: c_long = 128;
553554
pub const SYS_delete_module: c_long = 129;
555+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
554556
pub const SYS_get_kernel_syms: c_long = 130;
555557
pub const SYS_quotactl: c_long = 131;
556558
pub const SYS_getpgid: c_long = 132;
@@ -587,6 +589,7 @@ pub const SYS_mremap: c_long = 163;
587589
pub const SYS_setresuid16: c_long = 164;
588590
pub const SYS_getresuid16: c_long = 165;
589591
pub const SYS_getpagesize: c_long = 166;
592+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
590593
pub const SYS_query_module: c_long = 167;
591594
pub const SYS_poll: c_long = 168;
592595
pub const SYS_nfsservctl: c_long = 169;

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

+3
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,11 @@ pub const SYS_modify_ldt: c_long = 4000 + 123;
289289
pub const SYS_adjtimex: c_long = 4000 + 124;
290290
pub const SYS_mprotect: c_long = 4000 + 125;
291291
pub const SYS_sigprocmask: c_long = 4000 + 126;
292+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
292293
pub const SYS_create_module: c_long = 4000 + 127;
293294
pub const SYS_init_module: c_long = 4000 + 128;
294295
pub const SYS_delete_module: c_long = 4000 + 129;
296+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
295297
pub const SYS_get_kernel_syms: c_long = 4000 + 130;
296298
pub const SYS_quotactl: c_long = 4000 + 131;
297299
pub const SYS_getpgid: c_long = 4000 + 132;
@@ -348,6 +350,7 @@ pub const SYS_socket: c_long = 4000 + 183;
348350
pub const SYS_socketpair: c_long = 4000 + 184;
349351
pub const SYS_setresuid: c_long = 4000 + 185;
350352
pub const SYS_getresuid: c_long = 4000 + 186;
353+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
351354
pub const SYS_query_module: c_long = 4000 + 187;
352355
pub const SYS_poll: c_long = 4000 + 188;
353356
pub const SYS_nfsservctl: c_long = 4000 + 189;

src/unix/linux_like/linux/gnu/b32/powerpc.rs

+3
Original file line numberDiff line numberDiff line change
@@ -555,9 +555,11 @@ pub const SYS_modify_ldt: c_long = 123;
555555
pub const SYS_adjtimex: c_long = 124;
556556
pub const SYS_mprotect: c_long = 125;
557557
pub const SYS_sigprocmask: c_long = 126;
558+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
558559
pub const SYS_create_module: c_long = 127;
559560
pub const SYS_init_module: c_long = 128;
560561
pub const SYS_delete_module: c_long = 129;
562+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
561563
pub const SYS_get_kernel_syms: c_long = 130;
562564
pub const SYS_quotactl: c_long = 131;
563565
pub const SYS_getpgid: c_long = 132;
@@ -594,6 +596,7 @@ pub const SYS_nanosleep: c_long = 162;
594596
pub const SYS_mremap: c_long = 163;
595597
pub const SYS_setresuid: c_long = 164;
596598
pub const SYS_getresuid: c_long = 165;
599+
#[deprecated(since = "0.2.70", note = "Functional up to 2.6 kernel")]
597600
pub const SYS_query_module: c_long = 166;
598601
pub const SYS_poll: c_long = 167;
599602
pub const SYS_nfsservctl: c_long = 168;

0 commit comments

Comments
 (0)