diff --git a/libc-test/semver/linux-gnu.txt b/libc-test/semver/linux-gnu.txt index e05d2c2fdbb8d..83dd825584cd0 100644 --- a/libc-test/semver/linux-gnu.txt +++ b/libc-test/semver/linux-gnu.txt @@ -652,6 +652,7 @@ lio_listio mallinfo mallinfo2 malloc_info +malloc_stats malloc_trim malloc_usable_size mallopt diff --git a/libc-test/semver/redox.txt b/libc-test/semver/redox.txt index 80095a09f5345..8e7403982e216 100644 --- a/libc-test/semver/redox.txt +++ b/libc-test/semver/redox.txt @@ -96,8 +96,19 @@ EUSERS EXFULL FIONREAD IMAXBEL +IPPROTO_ICMP +IPPROTO_IDP +IPPROTO_IGMP +IPPROTO_IP +IPPROTO_IPV6 +IPPROTO_MAX +IPPROTO_PUP +IPPROTO_TCP +IPPROTO_UDP IPV6_ADD_MEMBERSHIP IPV6_DROP_MEMBERSHIP +IP_RECVTOS +IP_TOS IUCLC IUTF8 MADV_DONTNEED @@ -129,6 +140,7 @@ SIGPWR SIGSTKFLT SOCK_CLOEXEC SOCK_NONBLOCK +SOCK_RAW SO_BSDCOMPAT SO_DOMAIN SO_NO_CHECK diff --git a/libc-test/semver/windows.txt b/libc-test/semver/windows.txt index de7aea0e91a4d..db55da5f4e48d 100644 --- a/libc-test/semver/windows.txt +++ b/libc-test/semver/windows.txt @@ -150,6 +150,7 @@ accept access aligned_free aligned_malloc +aligned_realloc atexit atof atoi diff --git a/src/unix/linux_like/linux/gnu/b32/arm/mod.rs b/src/unix/linux_like/linux/gnu/b32/arm/mod.rs index 0037015a1821b..c58dd6d45b690 100644 --- a/src/unix/linux_like/linux/gnu/b32/arm/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/arm/mod.rs @@ -22,7 +22,8 @@ s! { pub f_namelen: ::__fsword_t, pub f_frsize: ::__fsword_t, - f_spare: [::__fsword_t; 5], + pub f_flags: ::__fsword_t, + f_spare: [::__fsword_t; 4], } pub struct flock { diff --git a/src/unix/linux_like/linux/gnu/b32/mips/mod.rs b/src/unix/linux_like/linux/gnu/b32/mips/mod.rs index 80b509bc574b5..6655fc9c4faf4 100644 --- a/src/unix/linux_like/linux/gnu/b32/mips/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/mips/mod.rs @@ -37,7 +37,8 @@ s! { pub f_fsid: ::fsid_t, pub f_namelen: ::c_long, - f_spare: [::c_long; 6], + pub f_flags: ::c_long, + f_spare: [::c_long; 5], } pub struct statfs64 { diff --git a/src/unix/linux_like/linux/gnu/b32/powerpc.rs b/src/unix/linux_like/linux/gnu/b32/powerpc.rs index cb7fdf7661472..da50989c7fccb 100644 --- a/src/unix/linux_like/linux/gnu/b32/powerpc.rs +++ b/src/unix/linux_like/linux/gnu/b32/powerpc.rs @@ -22,7 +22,8 @@ s! { pub f_namelen: ::__fsword_t, pub f_frsize: ::__fsword_t, - f_spare: [::__fsword_t; 5], + pub f_flags: ::__fsword_t, + f_spare: [::__fsword_t; 4], } pub struct flock { 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 539e13bac9b3a..4592013b8ddcb 100644 --- a/src/unix/linux_like/linux/gnu/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/x86/mod.rs @@ -23,7 +23,8 @@ s! { pub f_namelen: ::__fsword_t, pub f_frsize: ::__fsword_t, - f_spare: [::__fsword_t; 5], + pub f_flags: ::__fsword_t, + f_spare: [::__fsword_t; 4], } pub struct flock { diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs index 426304efd57ea..bfb73414a8b9e 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -1495,6 +1495,7 @@ extern "C" { pub fn pthread_sigqueue(thread: ::pthread_t, sig: ::c_int, value: ::sigval) -> ::c_int; pub fn mallinfo() -> ::mallinfo; pub fn mallinfo2() -> ::mallinfo2; + pub fn malloc_stats(); pub fn malloc_info(options: ::c_int, stream: *mut ::FILE) -> ::c_int; pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t; pub fn getpwent_r( diff --git a/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs b/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs index 5c9e68dcd950e..d5c02419135e0 100644 --- a/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs @@ -581,6 +581,8 @@ pub const SYS_pkey_mprotect: ::c_long = 288; pub const SYS_pkey_alloc: ::c_long = 289; pub const SYS_pkey_free: ::c_long = 290; pub const SYS_statx: ::c_long = 291; +pub const SYS_io_pgetevents: ::c_long = 292; +pub const SYS_rseq: ::c_long = 293; pub const SYS_pidfd_send_signal: ::c_long = 424; pub const SYS_io_uring_setup: ::c_long = 425; pub const SYS_io_uring_enter: ::c_long = 426; diff --git a/src/unix/linux_like/linux/musl/b64/powerpc64.rs b/src/unix/linux_like/linux/musl/b64/powerpc64.rs index 202abe8796b13..c7cb63dd0b76f 100644 --- a/src/unix/linux_like/linux/musl/b64/powerpc64.rs +++ b/src/unix/linux_like/linux/musl/b64/powerpc64.rs @@ -582,6 +582,22 @@ pub const SYS_preadv2: ::c_long = 380; pub const SYS_pwritev2: ::c_long = 381; pub const SYS_kexec_file_load: ::c_long = 382; pub const SYS_statx: ::c_long = 383; +pub const SYS_pkey_alloc: ::c_long = 384; +pub const SYS_pkey_free: ::c_long = 385; +pub const SYS_pkey_mprotect: ::c_long = 386; +pub const SYS_rseq: ::c_long = 387; +pub const SYS_io_pgetevents: ::c_long = 388; +pub const SYS_semtimedop: ::c_long = 392; +pub const SYS_semget: ::c_long = 393; +pub const SYS_semctl: ::c_long = 394; +pub const SYS_shmget: ::c_long = 395; +pub const SYS_shmctl: ::c_long = 396; +pub const SYS_shmat: ::c_long = 397; +pub const SYS_shmdt: ::c_long = 398; +pub const SYS_msgget: ::c_long = 399; +pub const SYS_msgsnd: ::c_long = 400; +pub const SYS_msgrcv: ::c_long = 401; +pub const SYS_msgctl: ::c_long = 402; pub const SYS_pidfd_send_signal: ::c_long = 424; pub const SYS_io_uring_setup: ::c_long = 425; pub const SYS_io_uring_enter: ::c_long = 426; diff --git a/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs b/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs index caa05ccc4f603..b48f7ac56b095 100644 --- a/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs @@ -510,6 +510,8 @@ pub const SYS_pkey_mprotect: ::c_long = 288; pub const SYS_pkey_alloc: ::c_long = 289; pub const SYS_pkey_free: ::c_long = 290; pub const SYS_statx: ::c_long = 291; +pub const SYS_io_pgetevents: ::c_long = 292; +pub const SYS_rseq: ::c_long = 293; pub const SYS_pidfd_send_signal: ::c_long = 424; pub const SYS_io_uring_setup: ::c_long = 425; pub const SYS_io_uring_enter: ::c_long = 426; diff --git a/src/unix/linux_like/linux/musl/b64/s390x.rs b/src/unix/linux_like/linux/musl/b64/s390x.rs index 567914f7b8cd5..02c9d117abeee 100644 --- a/src/unix/linux_like/linux/musl/b64/s390x.rs +++ b/src/unix/linux_like/linux/musl/b64/s390x.rs @@ -475,6 +475,7 @@ pub const SYS_sysfs: ::c_long = 135; pub const SYS_personality: ::c_long = 136; pub const SYS_afs_syscall: ::c_long = 137; /* Syscall for Andrew File System */ pub const SYS_getdents: ::c_long = 141; +pub const SYS_select: ::c_long = 142; pub const SYS_flock: ::c_long = 143; pub const SYS_msync: ::c_long = 144; pub const SYS_readv: ::c_long = 145; @@ -517,6 +518,26 @@ pub const SYS_sendfile: ::c_long = 187; pub const SYS_getpmsg: ::c_long = 188; pub const SYS_putpmsg: ::c_long = 189; pub const SYS_vfork: ::c_long = 190; +pub const SYS_getrlimit: ::c_long = 191; +pub const SYS_lchown: ::c_long = 198; +pub const SYS_getuid: ::c_long = 199; +pub const SYS_getgid: ::c_long = 200; +pub const SYS_geteuid: ::c_long = 201; +pub const SYS_getegid: ::c_long = 202; +pub const SYS_setreuid: ::c_long = 203; +pub const SYS_setregid: ::c_long = 204; +pub const SYS_getgroups: ::c_long = 205; +pub const SYS_setgroups: ::c_long = 206; +pub const SYS_fchown: ::c_long = 207; +pub const SYS_setresuid: ::c_long = 208; +pub const SYS_getresuid: ::c_long = 209; +pub const SYS_setresgid: ::c_long = 210; +pub const SYS_getresgid: ::c_long = 211; +pub const SYS_chown: ::c_long = 212; +pub const SYS_setuid: ::c_long = 213; +pub const SYS_setgid: ::c_long = 214; +pub const SYS_setfsuid: ::c_long = 215; +pub const SYS_setfsgid: ::c_long = 216; pub const SYS_pivot_root: ::c_long = 217; pub const SYS_mincore: ::c_long = 218; pub const SYS_madvise: ::c_long = 219; @@ -588,6 +609,7 @@ pub const SYS_mkdirat: ::c_long = 289; pub const SYS_mknodat: ::c_long = 290; pub const SYS_fchownat: ::c_long = 291; pub const SYS_futimesat: ::c_long = 292; +pub const SYS_newfstatat: ::c_long = 293; pub const SYS_unlinkat: ::c_long = 294; pub const SYS_renameat: ::c_long = 295; pub const SYS_linkat: ::c_long = 296; @@ -672,29 +694,26 @@ pub const SYS_mlock2: ::c_long = 374; pub const SYS_copy_file_range: ::c_long = 375; pub const SYS_preadv2: ::c_long = 376; pub const SYS_pwritev2: ::c_long = 377; -pub const SYS_lchown: ::c_long = 198; -pub const SYS_setuid: ::c_long = 213; -pub const SYS_getuid: ::c_long = 199; -pub const SYS_setgid: ::c_long = 214; -pub const SYS_getgid: ::c_long = 200; -pub const SYS_geteuid: ::c_long = 201; -pub const SYS_setreuid: ::c_long = 203; -pub const SYS_setregid: ::c_long = 204; -pub const SYS_getrlimit: ::c_long = 191; -pub const SYS_getgroups: ::c_long = 205; -pub const SYS_fchown: ::c_long = 207; -pub const SYS_setresuid: ::c_long = 208; -pub const SYS_setresgid: ::c_long = 210; -pub const SYS_getresgid: ::c_long = 211; -pub const SYS_select: ::c_long = 142; -pub const SYS_getegid: ::c_long = 202; -pub const SYS_setgroups: ::c_long = 206; -pub const SYS_getresuid: ::c_long = 209; -pub const SYS_chown: ::c_long = 212; -pub const SYS_setfsuid: ::c_long = 215; -pub const SYS_setfsgid: ::c_long = 216; -pub const SYS_newfstatat: ::c_long = 293; +pub const SYS_s390_guarded_storage: ::c_long = 378; pub const SYS_statx: ::c_long = 379; +pub const SYS_s390_sthyi: ::c_long = 380; +pub const SYS_kexec_file_load: ::c_long = 381; +pub const SYS_io_pgetevents: ::c_long = 382; +pub const SYS_rseq: ::c_long = 383; +pub const SYS_pkey_mprotect: ::c_long = 384; +pub const SYS_pkey_alloc: ::c_long = 385; +pub const SYS_pkey_free: ::c_long = 386; +pub const SYS_semtimedop: ::c_long = 392; +pub const SYS_semget: ::c_long = 393; +pub const SYS_semctl: ::c_long = 394; +pub const SYS_shmget: ::c_long = 395; +pub const SYS_shmctl: ::c_long = 396; +pub const SYS_shmat: ::c_long = 397; +pub const SYS_shmdt: ::c_long = 398; +pub const SYS_msgget: ::c_long = 399; +pub const SYS_msgsnd: ::c_long = 400; +pub const SYS_msgrcv: ::c_long = 401; +pub const SYS_msgctl: ::c_long = 402; pub const SYS_pidfd_send_signal: ::c_long = 424; pub const SYS_io_uring_setup: ::c_long = 425; pub const SYS_io_uring_enter: ::c_long = 426; @@ -714,7 +733,6 @@ pub const SYS_faccessat2: ::c_long = 439; pub const SYS_process_madvise: ::c_long = 440; pub const SYS_epoll_pwait2: ::c_long = 441; pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; pub const SYS_landlock_create_ruleset: ::c_long = 444; pub const SYS_landlock_add_rule: ::c_long = 445; pub const SYS_landlock_restrict_self: ::c_long = 446; @@ -722,4 +740,5 @@ 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_mseal: ::c_long = 462; +pub const SYS_cachestat: ::c_long = 451; +pub const SYS_fchmodat2: ::c_long = 452; 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 fcf07379ee81a..81c9772cdbb44 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 @@ -602,6 +602,8 @@ pub const SYS_pkey_mprotect: ::c_long = 329; pub const SYS_pkey_alloc: ::c_long = 330; pub const SYS_pkey_free: ::c_long = 331; pub const SYS_statx: ::c_long = 332; +pub const SYS_io_pgetevents: ::c_long = 333; +pub const SYS_rseq: ::c_long = 334; pub const SYS_pidfd_send_signal: ::c_long = 424; pub const SYS_io_uring_setup: ::c_long = 425; pub const SYS_io_uring_enter: ::c_long = 426; diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs index 39e7346b0cc33..262079e042c5b 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; diff --git a/src/windows/mod.rs b/src/windows/mod.rs index 43075e7e0362a..042c6221e7375 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -522,6 +522,9 @@ extern "C" { pub fn aligned_malloc(size: size_t, alignment: size_t) -> *mut c_void; #[link_name = "_aligned_free"] pub fn aligned_free(ptr: *mut ::c_void); + #[link_name = "_aligned_realloc"] + pub fn aligned_realloc(memblock: *mut ::c_void, size: size_t, alignment: size_t) + -> *mut c_void; #[link_name = "_putenv"] pub fn putenv(envstring: *const ::c_char) -> ::c_int; #[link_name = "_wputenv"]