Skip to content

Commit d148860

Browse files
authored
Merge pull request rust-lang#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

Lines changed: 6 additions & 3 deletions
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

Lines changed: 3 additions & 1 deletion
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 6 additions & 3 deletions
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

Lines changed: 3 additions & 3 deletions
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
}

0 commit comments

Comments
 (0)