Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/rust-lang/libc
Browse files Browse the repository at this point in the history
  • Loading branch information
agg23 committed Feb 20, 2024
2 parents 5a96762 + 3d0b15b commit a0aa71e
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/full_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down Expand Up @@ -2427,6 +2429,9 @@ fn test_freebsd(target: &str) {
true
}

// FIXME: Removed in FreeBSD 15:
"LOCAL_CONNWAIT" => true,

_ => false,
}
});
Expand Down Expand Up @@ -4111,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 <include/linux/sched.h>:
"PF_VCPU"
| "PF_IDLE"
Expand Down
12 changes: 12 additions & 0 deletions libc-test/semver/redox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -129,6 +140,7 @@ SIGPWR
SIGSTKFLT
SOCK_CLOEXEC
SOCK_NONBLOCK
SOCK_RAW
SO_BSDCOMPAT
SO_DOMAIN
SO_NO_CHECK
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/gnu/b32/x86/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/musl/b32/x86/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/musl/b64/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions src/unix/redox/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a0aa71e

Please sign in to comment.