Skip to content

Commit 9b870d4

Browse files
authored
Merge pull request #4082 from tgross35/backport-fennel
[0.2] Backports
2 parents 643aff5 + 7c7d9c4 commit 9b870d4

File tree

15 files changed

+98
-28
lines changed

15 files changed

+98
-28
lines changed

libc-test/semver/linux-gnu.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,7 @@ lio_listio
652652
mallinfo
653653
mallinfo2
654654
malloc_info
655+
malloc_stats
655656
malloc_trim
656657
malloc_usable_size
657658
mallopt

libc-test/semver/redox.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,19 @@ EUSERS
9696
EXFULL
9797
FIONREAD
9898
IMAXBEL
99+
IPPROTO_ICMP
100+
IPPROTO_IDP
101+
IPPROTO_IGMP
102+
IPPROTO_IP
103+
IPPROTO_IPV6
104+
IPPROTO_MAX
105+
IPPROTO_PUP
106+
IPPROTO_TCP
107+
IPPROTO_UDP
99108
IPV6_ADD_MEMBERSHIP
100109
IPV6_DROP_MEMBERSHIP
110+
IP_RECVTOS
111+
IP_TOS
101112
IUCLC
102113
IUTF8
103114
MADV_DONTNEED
@@ -129,6 +140,7 @@ SIGPWR
129140
SIGSTKFLT
130141
SOCK_CLOEXEC
131142
SOCK_NONBLOCK
143+
SOCK_RAW
132144
SO_BSDCOMPAT
133145
SO_DOMAIN
134146
SO_NO_CHECK

libc-test/semver/windows.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ accept
150150
access
151151
aligned_free
152152
aligned_malloc
153+
aligned_realloc
153154
atexit
154155
atof
155156
atoi

src/unix/linux_like/linux/gnu/b32/arm/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ s! {
2222

2323
pub f_namelen: ::__fsword_t,
2424
pub f_frsize: ::__fsword_t,
25-
f_spare: [::__fsword_t; 5],
25+
pub f_flags: ::__fsword_t,
26+
f_spare: [::__fsword_t; 4],
2627
}
2728

2829
pub struct flock {

src/unix/linux_like/linux/gnu/b32/mips/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ s! {
3737
pub f_fsid: ::fsid_t,
3838

3939
pub f_namelen: ::c_long,
40-
f_spare: [::c_long; 6],
40+
pub f_flags: ::c_long,
41+
f_spare: [::c_long; 5],
4142
}
4243

4344
pub struct statfs64 {

src/unix/linux_like/linux/gnu/b32/powerpc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ s! {
2222

2323
pub f_namelen: ::__fsword_t,
2424
pub f_frsize: ::__fsword_t,
25-
f_spare: [::__fsword_t; 5],
25+
pub f_flags: ::__fsword_t,
26+
f_spare: [::__fsword_t; 4],
2627
}
2728

2829
pub struct flock {

src/unix/linux_like/linux/gnu/b32/x86/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ s! {
2323

2424
pub f_namelen: ::__fsword_t,
2525
pub f_frsize: ::__fsword_t,
26-
f_spare: [::__fsword_t; 5],
26+
pub f_flags: ::__fsword_t,
27+
f_spare: [::__fsword_t; 4],
2728
}
2829

2930
pub struct flock {

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,6 +1495,7 @@ extern "C" {
14951495
pub fn pthread_sigqueue(thread: ::pthread_t, sig: ::c_int, value: ::sigval) -> ::c_int;
14961496
pub fn mallinfo() -> ::mallinfo;
14971497
pub fn mallinfo2() -> ::mallinfo2;
1498+
pub fn malloc_stats();
14981499
pub fn malloc_info(options: ::c_int, stream: *mut ::FILE) -> ::c_int;
14991500
pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t;
15001501
pub fn getpwent_r(

src/unix/linux_like/linux/musl/b64/aarch64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,8 @@ pub const SYS_pkey_mprotect: ::c_long = 288;
581581
pub const SYS_pkey_alloc: ::c_long = 289;
582582
pub const SYS_pkey_free: ::c_long = 290;
583583
pub const SYS_statx: ::c_long = 291;
584+
pub const SYS_io_pgetevents: ::c_long = 292;
585+
pub const SYS_rseq: ::c_long = 293;
584586
pub const SYS_pidfd_send_signal: ::c_long = 424;
585587
pub const SYS_io_uring_setup: ::c_long = 425;
586588
pub const SYS_io_uring_enter: ::c_long = 426;

src/unix/linux_like/linux/musl/b64/powerpc64.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,22 @@ pub const SYS_preadv2: ::c_long = 380;
582582
pub const SYS_pwritev2: ::c_long = 381;
583583
pub const SYS_kexec_file_load: ::c_long = 382;
584584
pub const SYS_statx: ::c_long = 383;
585+
pub const SYS_pkey_alloc: ::c_long = 384;
586+
pub const SYS_pkey_free: ::c_long = 385;
587+
pub const SYS_pkey_mprotect: ::c_long = 386;
588+
pub const SYS_rseq: ::c_long = 387;
589+
pub const SYS_io_pgetevents: ::c_long = 388;
590+
pub const SYS_semtimedop: ::c_long = 392;
591+
pub const SYS_semget: ::c_long = 393;
592+
pub const SYS_semctl: ::c_long = 394;
593+
pub const SYS_shmget: ::c_long = 395;
594+
pub const SYS_shmctl: ::c_long = 396;
595+
pub const SYS_shmat: ::c_long = 397;
596+
pub const SYS_shmdt: ::c_long = 398;
597+
pub const SYS_msgget: ::c_long = 399;
598+
pub const SYS_msgsnd: ::c_long = 400;
599+
pub const SYS_msgrcv: ::c_long = 401;
600+
pub const SYS_msgctl: ::c_long = 402;
585601
pub const SYS_pidfd_send_signal: ::c_long = 424;
586602
pub const SYS_io_uring_setup: ::c_long = 425;
587603
pub const SYS_io_uring_enter: ::c_long = 426;

src/unix/linux_like/linux/musl/b64/riscv64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ pub const SYS_pkey_mprotect: ::c_long = 288;
510510
pub const SYS_pkey_alloc: ::c_long = 289;
511511
pub const SYS_pkey_free: ::c_long = 290;
512512
pub const SYS_statx: ::c_long = 291;
513+
pub const SYS_io_pgetevents: ::c_long = 292;
514+
pub const SYS_rseq: ::c_long = 293;
513515
pub const SYS_pidfd_send_signal: ::c_long = 424;
514516
pub const SYS_io_uring_setup: ::c_long = 425;
515517
pub const SYS_io_uring_enter: ::c_long = 426;

src/unix/linux_like/linux/musl/b64/s390x.rs

Lines changed: 43 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ pub const SYS_sysfs: ::c_long = 135;
475475
pub const SYS_personality: ::c_long = 136;
476476
pub const SYS_afs_syscall: ::c_long = 137; /* Syscall for Andrew File System */
477477
pub const SYS_getdents: ::c_long = 141;
478+
pub const SYS_select: ::c_long = 142;
478479
pub const SYS_flock: ::c_long = 143;
479480
pub const SYS_msync: ::c_long = 144;
480481
pub const SYS_readv: ::c_long = 145;
@@ -517,6 +518,26 @@ pub const SYS_sendfile: ::c_long = 187;
517518
pub const SYS_getpmsg: ::c_long = 188;
518519
pub const SYS_putpmsg: ::c_long = 189;
519520
pub const SYS_vfork: ::c_long = 190;
521+
pub const SYS_getrlimit: ::c_long = 191;
522+
pub const SYS_lchown: ::c_long = 198;
523+
pub const SYS_getuid: ::c_long = 199;
524+
pub const SYS_getgid: ::c_long = 200;
525+
pub const SYS_geteuid: ::c_long = 201;
526+
pub const SYS_getegid: ::c_long = 202;
527+
pub const SYS_setreuid: ::c_long = 203;
528+
pub const SYS_setregid: ::c_long = 204;
529+
pub const SYS_getgroups: ::c_long = 205;
530+
pub const SYS_setgroups: ::c_long = 206;
531+
pub const SYS_fchown: ::c_long = 207;
532+
pub const SYS_setresuid: ::c_long = 208;
533+
pub const SYS_getresuid: ::c_long = 209;
534+
pub const SYS_setresgid: ::c_long = 210;
535+
pub const SYS_getresgid: ::c_long = 211;
536+
pub const SYS_chown: ::c_long = 212;
537+
pub const SYS_setuid: ::c_long = 213;
538+
pub const SYS_setgid: ::c_long = 214;
539+
pub const SYS_setfsuid: ::c_long = 215;
540+
pub const SYS_setfsgid: ::c_long = 216;
520541
pub const SYS_pivot_root: ::c_long = 217;
521542
pub const SYS_mincore: ::c_long = 218;
522543
pub const SYS_madvise: ::c_long = 219;
@@ -588,6 +609,7 @@ pub const SYS_mkdirat: ::c_long = 289;
588609
pub const SYS_mknodat: ::c_long = 290;
589610
pub const SYS_fchownat: ::c_long = 291;
590611
pub const SYS_futimesat: ::c_long = 292;
612+
pub const SYS_newfstatat: ::c_long = 293;
591613
pub const SYS_unlinkat: ::c_long = 294;
592614
pub const SYS_renameat: ::c_long = 295;
593615
pub const SYS_linkat: ::c_long = 296;
@@ -672,29 +694,26 @@ pub const SYS_mlock2: ::c_long = 374;
672694
pub const SYS_copy_file_range: ::c_long = 375;
673695
pub const SYS_preadv2: ::c_long = 376;
674696
pub const SYS_pwritev2: ::c_long = 377;
675-
pub const SYS_lchown: ::c_long = 198;
676-
pub const SYS_setuid: ::c_long = 213;
677-
pub const SYS_getuid: ::c_long = 199;
678-
pub const SYS_setgid: ::c_long = 214;
679-
pub const SYS_getgid: ::c_long = 200;
680-
pub const SYS_geteuid: ::c_long = 201;
681-
pub const SYS_setreuid: ::c_long = 203;
682-
pub const SYS_setregid: ::c_long = 204;
683-
pub const SYS_getrlimit: ::c_long = 191;
684-
pub const SYS_getgroups: ::c_long = 205;
685-
pub const SYS_fchown: ::c_long = 207;
686-
pub const SYS_setresuid: ::c_long = 208;
687-
pub const SYS_setresgid: ::c_long = 210;
688-
pub const SYS_getresgid: ::c_long = 211;
689-
pub const SYS_select: ::c_long = 142;
690-
pub const SYS_getegid: ::c_long = 202;
691-
pub const SYS_setgroups: ::c_long = 206;
692-
pub const SYS_getresuid: ::c_long = 209;
693-
pub const SYS_chown: ::c_long = 212;
694-
pub const SYS_setfsuid: ::c_long = 215;
695-
pub const SYS_setfsgid: ::c_long = 216;
696-
pub const SYS_newfstatat: ::c_long = 293;
697+
pub const SYS_s390_guarded_storage: ::c_long = 378;
697698
pub const SYS_statx: ::c_long = 379;
699+
pub const SYS_s390_sthyi: ::c_long = 380;
700+
pub const SYS_kexec_file_load: ::c_long = 381;
701+
pub const SYS_io_pgetevents: ::c_long = 382;
702+
pub const SYS_rseq: ::c_long = 383;
703+
pub const SYS_pkey_mprotect: ::c_long = 384;
704+
pub const SYS_pkey_alloc: ::c_long = 385;
705+
pub const SYS_pkey_free: ::c_long = 386;
706+
pub const SYS_semtimedop: ::c_long = 392;
707+
pub const SYS_semget: ::c_long = 393;
708+
pub const SYS_semctl: ::c_long = 394;
709+
pub const SYS_shmget: ::c_long = 395;
710+
pub const SYS_shmctl: ::c_long = 396;
711+
pub const SYS_shmat: ::c_long = 397;
712+
pub const SYS_shmdt: ::c_long = 398;
713+
pub const SYS_msgget: ::c_long = 399;
714+
pub const SYS_msgsnd: ::c_long = 400;
715+
pub const SYS_msgrcv: ::c_long = 401;
716+
pub const SYS_msgctl: ::c_long = 402;
698717
pub const SYS_pidfd_send_signal: ::c_long = 424;
699718
pub const SYS_io_uring_setup: ::c_long = 425;
700719
pub const SYS_io_uring_enter: ::c_long = 426;
@@ -714,12 +733,12 @@ pub const SYS_faccessat2: ::c_long = 439;
714733
pub const SYS_process_madvise: ::c_long = 440;
715734
pub const SYS_epoll_pwait2: ::c_long = 441;
716735
pub const SYS_mount_setattr: ::c_long = 442;
717-
pub const SYS_quotactl_fd: ::c_long = 443;
718736
pub const SYS_landlock_create_ruleset: ::c_long = 444;
719737
pub const SYS_landlock_add_rule: ::c_long = 445;
720738
pub const SYS_landlock_restrict_self: ::c_long = 446;
721739
pub const SYS_memfd_secret: ::c_long = 447;
722740
pub const SYS_process_mrelease: ::c_long = 448;
723741
pub const SYS_futex_waitv: ::c_long = 449;
724742
pub const SYS_set_mempolicy_home_node: ::c_long = 450;
725-
pub const SYS_mseal: ::c_long = 462;
743+
pub const SYS_cachestat: ::c_long = 451;
744+
pub const SYS_fchmodat2: ::c_long = 452;

src/unix/linux_like/linux/musl/b64/x86_64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,8 @@ pub const SYS_pkey_mprotect: ::c_long = 329;
602602
pub const SYS_pkey_alloc: ::c_long = 330;
603603
pub const SYS_pkey_free: ::c_long = 331;
604604
pub const SYS_statx: ::c_long = 332;
605+
pub const SYS_io_pgetevents: ::c_long = 333;
606+
pub const SYS_rseq: ::c_long = 334;
605607
pub const SYS_pidfd_send_signal: ::c_long = 424;
606608
pub const SYS_io_uring_setup: ::c_long = 425;
607609
pub const SYS_io_uring_enter: ::c_long = 426;

src/unix/redox/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,13 @@ pub const IP_MULTICAST_TTL: ::c_int = 33;
585585
pub const IP_MULTICAST_LOOP: ::c_int = 34;
586586
pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
587587
pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
588+
pub const IP_TOS: ::c_int = 1;
589+
pub const IP_RECVTOS: ::c_int = 2;
590+
pub const IPPROTO_IGMP: ::c_int = 2;
591+
pub const IPPROTO_PUP: ::c_int = 12;
592+
pub const IPPROTO_IDP: ::c_int = 22;
588593
pub const IPPROTO_RAW: ::c_int = 255;
594+
pub const IPPROTO_MAX: ::c_int = 255;
589595
// }
590596

591597
// netinet/tcp.h
@@ -810,6 +816,7 @@ pub const SO_PROTOCOL: ::c_int = 38;
810816
pub const SO_DOMAIN: ::c_int = 39;
811817
pub const SOCK_STREAM: ::c_int = 1;
812818
pub const SOCK_DGRAM: ::c_int = 2;
819+
pub const SOCK_RAW: ::c_int = 3;
813820
pub const SOCK_NONBLOCK: ::c_int = 0o4_000;
814821
pub const SOCK_CLOEXEC: ::c_int = 0o2_000_000;
815822
pub const SOCK_SEQPACKET: ::c_int = 5;

src/windows/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,9 @@ extern "C" {
522522
pub fn aligned_malloc(size: size_t, alignment: size_t) -> *mut c_void;
523523
#[link_name = "_aligned_free"]
524524
pub fn aligned_free(ptr: *mut ::c_void);
525+
#[link_name = "_aligned_realloc"]
526+
pub fn aligned_realloc(memblock: *mut ::c_void, size: size_t, alignment: size_t)
527+
-> *mut c_void;
525528
#[link_name = "_putenv"]
526529
pub fn putenv(envstring: *const ::c_char) -> ::c_int;
527530
#[link_name = "_wputenv"]

0 commit comments

Comments
 (0)