From 37824e4a43f6175e155f93da6bfc445b9491a4cf Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 17 Feb 2024 14:29:38 +0900 Subject: [PATCH 1/5] Fix macOS CI --- libc-test/build.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 7d61f27b6d5bf..95025040530dd 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -296,6 +296,8 @@ fn test_apple(target: &str) { // it is a moving target, changing through versions // also contains bitfields members "tcp_connection_info" => true, + // FIXME: The size is changed in recent macOSes. + "malloc_introspection_t" => true, _ => false, } From 3d0e971df3fc625d8b854d7e4a1a67d1433b5279 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 17 Feb 2024 14:31:13 +0900 Subject: [PATCH 2/5] Disable `i686-pc-windows-gnu` CI --- .github/workflows/full_ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/full_ci.yml b/.github/workflows/full_ci.yml index b1a290d9df58b..4389a54375ba8 100644 --- a/.github/workflows/full_ci.yml +++ b/.github/workflows/full_ci.yml @@ -62,10 +62,11 @@ jobs: ARCH_BITS: 64 ARCH: x86_64 - target: x86_64-pc-windows-msvc - - target: i686-pc-windows-gnu - env: - ARCH_BITS: 32 - ARCH: i686 + # FIXME: It currently causes segfaults. + #- target: i686-pc-windows-gnu + # env: + # ARCH_BITS: 32 + # ARCH: i686 - target: i686-pc-windows-msvc steps: - uses: actions/checkout@v4 From ba128d7c1a0b769d558c704013ad1cf0d767f5b1 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 17 Feb 2024 14:54:57 +0900 Subject: [PATCH 3/5] Skip tests for `LOCAL_CONNWAIT` --- libc-test/build.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 95025040530dd..39a19dee28592 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2429,6 +2429,9 @@ fn test_freebsd(target: &str) { true } + // FIXME: Removed in FreeBSD 15: + "LOCAL_CONNWAIT" => true, + _ => false, } }); From 14bc9fb8089ed3d8d91938b65cc5cd5a1ad7a013 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 17 Feb 2024 16:52:40 +0000 Subject: [PATCH 4/5] adding new syscall id fchmodat2 for glibc/musl x86 (kernel >= 6.6). --- libc-test/build.rs | 3 +++ src/unix/linux_like/linux/gnu/b32/x86/mod.rs | 1 + src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs | 1 + src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs | 1 + src/unix/linux_like/linux/musl/b32/x86/mod.rs | 1 + src/unix/linux_like/linux/musl/b64/x86_64/mod.rs | 1 + 6 files changed, 8 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 39a19dee28592..7d3dfb88e1221 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -4116,6 +4116,9 @@ fn test_linux(target: &str) { true } + // FIXME: Requires >= 6.6 kernel headers. + "SYS_fchmodat2" => true, + // FIXME: seems to not be available all the time (from : "PF_VCPU" | "PF_IDLE" diff --git a/src/unix/linux_like/linux/gnu/b32/x86/mod.rs b/src/unix/linux_like/linux/gnu/b32/x86/mod.rs index 4ced1616cc4a7..2acac7fb7ad43 100644 --- a/src/unix/linux_like/linux/gnu/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/x86/mod.rs @@ -1044,6 +1044,7 @@ pub const SYS_memfd_secret: ::c_long = 447; pub const SYS_process_mrelease: ::c_long = 448; pub const SYS_futex_waitv: ::c_long = 449; pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_fchmodat2: ::c_long = 452; // offsets in user_regs_structs, from sys/reg.h pub const EBX: ::c_int = 0; diff --git a/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs index 1813f3ef41c68..f6b748254872f 100644 --- a/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs +++ b/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs @@ -430,6 +430,7 @@ pub const SYS_memfd_secret: ::c_long = 447; pub const SYS_process_mrelease: ::c_long = 448; pub const SYS_futex_waitv: ::c_long = 449; pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_fchmodat2: ::c_long = 452; extern "C" { pub fn sysctl( diff --git a/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs index 17da00db5c8c1..55b85e9626807 100644 --- a/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs +++ b/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs @@ -361,6 +361,7 @@ pub const SYS_memfd_secret: ::c_long = __X32_SYSCALL_BIT + 447; pub const SYS_process_mrelease: ::c_long = __X32_SYSCALL_BIT + 448; pub const SYS_futex_waitv: ::c_long = __X32_SYSCALL_BIT + 449; pub const SYS_set_mempolicy_home_node: ::c_long = __X32_SYSCALL_BIT + 450; +pub const SYS_fchmodat2: ::c_long = __X32_SYSCALL_BIT + 452; pub const SYS_rt_sigaction: ::c_long = __X32_SYSCALL_BIT + 512; pub const SYS_rt_sigreturn: ::c_long = __X32_SYSCALL_BIT + 513; pub const SYS_ioctl: ::c_long = __X32_SYSCALL_BIT + 514; diff --git a/src/unix/linux_like/linux/musl/b32/x86/mod.rs b/src/unix/linux_like/linux/musl/b32/x86/mod.rs index d0ed21fa3f5d7..f43c7ea60f8c7 100644 --- a/src/unix/linux_like/linux/musl/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/x86/mod.rs @@ -936,6 +936,7 @@ pub const SYS_memfd_secret: ::c_long = 447; pub const SYS_process_mrelease: ::c_long = 448; pub const SYS_futex_waitv: ::c_long = 449; pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_fchmodat2: ::c_long = 452; // offsets in user_regs_structs, from sys/reg.h pub const EBX: ::c_int = 0; diff --git a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs index d0ec67534d2da..f1c9f5af90c0f 100644 --- a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs @@ -608,6 +608,7 @@ pub const SYS_memfd_secret: ::c_long = 447; pub const SYS_process_mrelease: ::c_long = 448; pub const SYS_futex_waitv: ::c_long = 449; pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_fchmodat2: ::c_long = 452; // offsets in user_regs_structs, from sys/reg.h pub const R15: ::c_int = 0; From 50bbf3a39c1faf35533fd841416ebfc9c0ca5d60 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 16 Feb 2024 18:58:20 +0000 Subject: [PATCH 5/5] redox add new netinet constants --- libc-test/semver/redox.txt | 12 ++++++++++++ src/unix/redox/mod.rs | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/libc-test/semver/redox.txt b/libc-test/semver/redox.txt index 80095a09f5345..48b1e3c18278e 100644 --- a/libc-test/semver/redox.txt +++ b/libc-test/semver/redox.txt @@ -96,6 +96,17 @@ EUSERS EXFULL FIONREAD IMAXBEL +IP_RECVTOS +IP_TOS +IPPROTO_ICMP +IPPROTO_IDP +IPPROTO_IGMP +IPPROTO_IP +IPPROTO_IPV6 +IPPROTO_MAX +IPPROTO_PUP +IPPROTO_TCP +IPPROTO_UDP IPV6_ADD_MEMBERSHIP IPV6_DROP_MEMBERSHIP IUCLC @@ -129,6 +140,7 @@ SIGPWR SIGSTKFLT SOCK_CLOEXEC SOCK_NONBLOCK +SOCK_RAW SO_BSDCOMPAT SO_DOMAIN SO_NO_CHECK diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs index e219695107d7b..017d5038905f6 100644 --- a/src/unix/redox/mod.rs +++ b/src/unix/redox/mod.rs @@ -585,7 +585,13 @@ pub const IP_MULTICAST_TTL: ::c_int = 33; pub const IP_MULTICAST_LOOP: ::c_int = 34; pub const IP_ADD_MEMBERSHIP: ::c_int = 35; pub const IP_DROP_MEMBERSHIP: ::c_int = 36; +pub const IP_TOS: ::c_int = 1; +pub const IP_RECVTOS: ::c_int = 2; +pub const IPPROTO_IGMP: ::c_int = 2; +pub const IPPROTO_PUP: ::c_int = 12; +pub const IPPROTO_IDP: ::c_int = 22; pub const IPPROTO_RAW: ::c_int = 255; +pub const IPPROTO_MAX: ::c_int = 255; // } // netinet/tcp.h @@ -810,6 +816,7 @@ pub const SO_PROTOCOL: ::c_int = 38; pub const SO_DOMAIN: ::c_int = 39; pub const SOCK_STREAM: ::c_int = 1; pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_RAW: ::c_int = 3; pub const SOCK_NONBLOCK: ::c_int = 0o4_000; pub const SOCK_CLOEXEC: ::c_int = 0o2_000_000; pub const SOCK_SEQPACKET: ::c_int = 5;