Skip to content

Commit 03e6ffc

Browse files
authored
Merge pull request #4396 from tgross35/backport-serrano
[0.2] Backports
2 parents ae44b25 + f9a47ac commit 03e6ffc

File tree

20 files changed

+411
-111
lines changed

20 files changed

+411
-111
lines changed

build.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ const CHECK_CFG_EXTRA: &'static [(&'static str, &'static [&'static str])] = &[
3232
"switch", "aix", "ohos", "hurd", "rtems", "visionos", "nuttx", "cygwin",
3333
],
3434
),
35-
("target_env", &["illumos", "wasi", "aix", "ohos"]),
35+
(
36+
"target_env",
37+
&["illumos", "wasi", "aix", "ohos", "nto71_iosock", "nto80"],
38+
),
3639
(
3740
"target_arch",
3841
&["loongarch64", "mips32r6", "mips64r6", "csky"],

libc-test/build.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3307,6 +3307,20 @@ fn test_neutrino(target: &str) {
33073307
assert!(target.contains("nto-qnx"));
33083308

33093309
let mut cfg = ctest_cfg();
3310+
if target.ends_with("_iosock") {
3311+
let qnx_target_val = std::env::var("QNX_TARGET")
3312+
.unwrap_or_else(|_| "QNX_TARGET_not_set_please_source_qnxsdp".into());
3313+
3314+
cfg.include(qnx_target_val + "/usr/include/io-sock");
3315+
headers! { cfg:
3316+
"io-sock.h",
3317+
"sys/types.h",
3318+
"sys/socket.h",
3319+
"sys/sysctl.h",
3320+
"net/if.h",
3321+
"net/if_arp.h"
3322+
}
3323+
}
33103324

33113325
headers! { cfg:
33123326
"ctype.h",
@@ -3464,6 +3478,9 @@ fn test_neutrino(target: &str) {
34643478
// Does not exist in Neutrino
34653479
"locale_t" => true,
34663480

3481+
// FIXME: "'__uint128' undeclared" in C
3482+
"__uint128" => true,
3483+
34673484
_ => false,
34683485
}
34693486
});
@@ -3527,6 +3544,9 @@ fn test_neutrino(target: &str) {
35273544
// stack unwinding bug.
35283545
"__my_thread_exit" => true,
35293546

3547+
// Wrong const-ness
3548+
"dl_iterate_phdr" => true,
3549+
35303550
_ => false,
35313551
}
35323552
});
@@ -4178,6 +4198,9 @@ fn test_linux(target: &str) {
41784198
// FIXME(linux): Requires >= 6.12 kernel headers.
41794199
"dmabuf_cmsg" | "dmabuf_token" => true,
41804200

4201+
// FIXME(linux): Requires >= 6.4 kernel headers.
4202+
"ptrace_sud_config" => true,
4203+
41814204
_ => false,
41824205
}
41834206
});
@@ -4602,6 +4625,8 @@ fn test_linux(target: &str) {
46024625
| "SO_DEVMEM_DONTNEED"
46034626
| "SCM_DEVMEM_LINEAR"
46044627
| "SCM_DEVMEM_DMABUF" => true,
4628+
// FIXME(linux): Requires >= 6.4 kernel headers.
4629+
"PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG" | "PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG" => true,
46054630

46064631
_ => false,
46074632
}

libc-test/semver/android.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,6 +2446,7 @@ SOL_X25
24462446
SOMAXCONN
24472447
SO_ACCEPTCONN
24482448
SO_BINDTODEVICE
2449+
SO_BINDTOIFINDEX
24492450
SO_BROADCAST
24502451
SO_BSDCOMPAT
24512452
SO_BUSY_POLL

libc-test/semver/cygwin.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,12 @@ posix_fadvise
734734
posix_fallocate
735735
posix_madvise
736736
posix_spawn
737+
posix_spawn_file_actions_addchdir
738+
posix_spawn_file_actions_addchdir_np
737739
posix_spawn_file_actions_addclose
738740
posix_spawn_file_actions_adddup2
741+
posix_spawn_file_actions_addfchdir
742+
posix_spawn_file_actions_addfchdir_np
739743
posix_spawn_file_actions_addopen
740744
posix_spawn_file_actions_destroy
741745
posix_spawn_file_actions_init

libc-test/semver/linux-gnu.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ PR_SET_VMA
348348
PR_SET_VMA_ANON_NAME
349349
PTHREAD_MUTEX_ADAPTIVE_NP
350350
PTRACE_GET_SYSCALL_INFO
351+
PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG
352+
PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG
351353
PTRACE_SYSCALL_INFO_ENTRY
352354
PTRACE_SYSCALL_INFO_EXIT
353355
PTRACE_SYSCALL_INFO_NONE
@@ -652,6 +654,7 @@ pthread_rwlockattr_getkind_np
652654
pthread_rwlockattr_getpshared
653655
pthread_rwlockattr_setkind_np
654656
ptrace_peeksiginfo_args
657+
ptrace_sud_config
655658
ptrace_syscall_info
656659
putgrent
657660
putpwent

libc-test/semver/linux-musl.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ACCOUNTING
12
AF_IB
23
AF_MPLS
34
AF_XDP
@@ -37,6 +38,9 @@ RWF_HIPRI
3738
RWF_NOWAIT
3839
RWF_SYNC
3940
USER_PROCESS
41+
UT_HOSTSIZE
42+
UT_LINESIZE
43+
UT_NAMESIZE
4044
_CS_V6_ENV
4145
_CS_V7_ENV
4246
adjtimex
@@ -82,3 +86,4 @@ reallocarray
8286
setutxent
8387
tcp_info
8488
timex
89+
utmpxname

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ s! {
5151
// This is normally "struct vnode".
5252
/// Pointer to executable file.
5353
pub ki_textvp: *mut c_void,
54-
// This is normally "struct filedesc".
5554
/// Pointer to open file info.
56-
pub ki_fd: *mut c_void,
55+
pub ki_fd: *mut crate::filedesc,
5756
// This is normally "struct vmspace".
5857
/// Pointer to kernel vmspace struct.
5958
pub ki_vmspace: *mut c_void,

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ s! {
5959
// This is normally "struct vnode".
6060
/// Pointer to executable file.
6161
pub ki_textvp: *mut c_void,
62-
// This is normally "struct filedesc".
6362
/// Pointer to open file info.
64-
pub ki_fd: *mut c_void,
63+
pub ki_fd: *mut crate::filedesc,
6564
// This is normally "struct vmspace".
6665
/// Pointer to kernel vmspace struct.
6766
pub ki_vmspace: *mut c_void,

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ s! {
6969
// This is normally "struct vnode".
7070
/// Pointer to executable file.
7171
pub ki_textvp: *mut c_void,
72-
// This is normally "struct filedesc".
7372
/// Pointer to open file info.
74-
pub ki_fd: *mut c_void,
73+
pub ki_fd: *mut crate::filedesc,
7574
// This is normally "struct vmspace".
7675
/// Pointer to kernel vmspace struct.
7776
pub ki_vmspace: *mut c_void,

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ s! {
6969
// This is normally "struct vnode".
7070
/// Pointer to executable file.
7171
pub ki_textvp: *mut c_void,
72-
// This is normally "struct filedesc".
7372
/// Pointer to open file info.
74-
pub ki_fd: *mut c_void,
73+
pub ki_fd: *mut crate::filedesc,
7574
// This is normally "struct vmspace".
7675
/// Pointer to kernel vmspace struct.
7776
pub ki_vmspace: *mut c_void,

0 commit comments

Comments
 (0)