From bd00c8ea5c2d7f2fb7d037b0a3f7686acffd8688 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 13 Nov 2024 08:24:19 +0000 Subject: [PATCH 1/9] Merge pull request #3934 from Laura7089/feat/esp-idf-hostname Add `get_hostname` to esp-idf (backport ) (cherry picked from commit 600e1d195458e0474c9d8c9ffcc574a36f364afb) --- libc-test/semver/espidf.txt | 49 +++++++++++++++++++++++++++++++++++ src/unix/newlib/espidf/mod.rs | 2 ++ 2 files changed, 51 insertions(+) create mode 100644 libc-test/semver/espidf.txt diff --git a/libc-test/semver/espidf.txt b/libc-test/semver/espidf.txt new file mode 100644 index 0000000000000..74f0d0cb5266d --- /dev/null +++ b/libc-test/semver/espidf.txt @@ -0,0 +1,49 @@ +AF_INET6 +AF_UNIX +FIONBIO +MSG_CTRUNC +MSG_DONTROUTE +MSG_DONTWAIT +MSG_EOR +MSG_MORE +MSG_NOSIGNAL +MSG_OOB +MSG_PEEK +MSG_TRUNC +MSG_WAITALL +NSIG +POLLERR +POLLHUP +POLLIN +POLLOUT +POLLPRI +POLLRDBAND +POLLRDNORM +POLLWRBAND +POLLWRNORM +PTHREAD_STACK_MIN +SIGABRT +SIGFPE +SIGHUP +SIGILL +SIGINT +SIGQUIT +SIGSEGV +SIGTERM +SOL_SOCKET +cmsghdr +dirent +eventfd +gethostname +getrandom +msghdr +pthread_create +recvmsg +sendmsg +sigset_t +sockaddr +sockaddr_in +sockaddr_in6 +sockaddr_storage +sockaddr_un +stat diff --git a/src/unix/newlib/espidf/mod.rs b/src/unix/newlib/espidf/mod.rs index a73e85315971f..3a4ce49c5c217 100644 --- a/src/unix/newlib/espidf/mod.rs +++ b/src/unix/newlib/espidf/mod.rs @@ -109,6 +109,8 @@ extern "C" { pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; + pub fn gethostname(name: *mut ::c_char, namelen: ::ssize_t); + #[link_name = "lwip_sendmsg"] pub fn sendmsg(s: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t; #[link_name = "lwip_recvmsg"] From 0de08290ab5e5788d5a86340a476e8e8714796bd Mon Sep 17 00:00:00 2001 From: Takashiidobe Date: Wed, 13 Nov 2024 07:09:11 -0500 Subject: [PATCH 2/9] add getgrent, setgrent, endgrent calls for Android, introduced in API 26, with exclusions to testing since CI is currently on API 24 (backport ) (cherry picked from commit fd4b70cb08447ff5edaf216f0d28036e358cbfc7) --- libc-test/build.rs | 12 ++++++++++++ libc-test/semver/android.txt | 3 +++ src/unix/linux_like/android/mod.rs | 3 +++ 3 files changed, 18 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 47ca3b8feee3c..0dc9c9ff53064 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2072,6 +2072,18 @@ fn test_android(target: &str) { // Added in API level 28, but some tests use level 24. "fread_unlocked" | "fwrite_unlocked" | "fgets_unlocked" | "fflush_unlocked" => true, + // Added in API level 28, but some tests use level 24. + "aligned_alloc" => true, + + // Added in API level 26, but some tests use level 24. + "getgrent" => true, + + // Added in API level 26, but some tests use level 24. + "setgrent" => true, + + // Added in API level 26, but some tests use level 24. + "endgrent" => true, + // FIXME: bad function pointers: "isalnum" | "isalpha" | "iscntrl" | "isdigit" | "isgraph" | "islower" | "isprint" | "ispunct" | "isspace" | "isupper" | "isxdigit" | "isblank" | "tolower" diff --git a/libc-test/semver/android.txt b/libc-test/semver/android.txt index dadb474886ce0..21ce51c09f10b 100644 --- a/libc-test/semver/android.txt +++ b/libc-test/semver/android.txt @@ -3186,6 +3186,7 @@ dlsym dup dup2 duplocale +endgrent endservent epoll_create epoll_create1 @@ -3290,6 +3291,7 @@ getegid getenv geteuid getgid +getgrent getgrgid getgrgid_r getgrnam @@ -3684,6 +3686,7 @@ seteuid setfsgid setfsuid setgid +setgrent setgroups sethostname setlocale diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index 3896492ebe706..0ca2df45a291e 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -3675,6 +3675,9 @@ safe_f! { } extern "C" { + pub fn setgrent(); + pub fn endgrent(); + pub fn getgrent() -> *mut ::group; pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int; pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int; pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; From b47f24ef4d66af44b522957a59116495c8d0e99b Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 13 Nov 2024 14:13:46 -0600 Subject: [PATCH 3/9] triagebot: Set up autolabel and review labels (backport ) (cherry picked from commit 07ccaa65e71c9232f1f8877cf7ed95166e0a86ed) --- triagebot.toml | 153 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 148 insertions(+), 5 deletions(-) diff --git a/triagebot.toml b/triagebot.toml index 8b989c8db5058..3183d723f1cb8 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -3,15 +3,160 @@ allow-unauthenticated = [ "C-*", "O-*", "S-*" ] -[autolabel."S-waiting-on-review"] -new_pr = true - [assign] contributing_url = "https://github.com/rust-lang/libc/blob/HEAD/CONTRIBUTING.md" [assign.owners] "*" = ["@JohnTitor"] +[autolabel."S-waiting-on-review"] +new_pr = true + +[autolabel."O-android"] +trigger_files = ["src/unix/linux_like/android"] + +[autolabel."O-arm"] +trigger_files = [ + "src/solid/arm.rs", + "src/unix/bsd/freebsdlike/freebsd/arm.rs", + "src/unix/bsd/netbsdlike/netbsd/arm.rs", + "src/unix/bsd/netbsdlike/openbsd/arm.rs", + "src/unix/linux_like/android/b32/arm.rs", + "src/unix/linux_like/linux/gnu/b32/arm/", + "src/unix/linux_like/linux/musl/b32/arm/", + "src/unix/linux_like/linux/uclibc/arm/", + "src/unix/newlib/arm/", + "src/vxworks/arm.rs", +] + +[autolabel."O-bsd"] +trigger_files = ["src/unix/bsd/mod.rs"] + +[autolabel."O-dragonfly"] +trigger_files = ["src/unix/bsd/freebsdlike/dragonfly"] + +[autolabel."O-gnu"] +trigger_files = [ + "src/unix/linux_like/linux/gnu", + "src/windows/gnu", +] + +[autolabel."O-illumos"] +trigger_files = ["src/unix/solarish/illumos.rs"] + +[autolabel."O-linux"] +trigger_files = ["src/unix/linux_like/linux"] + +[autolabel."O-linux-like"] +trigger_files = ["src/unix/linux_like/mod.rs"] + +[autolabel."O-macos"] +trigger_files = ["src/unix/bsd/apple"] + +[autolabel."O-mips"] +trigger_files = [ + "src/unix/bsd/netbsdlike/netbsd/mips.rs", + "src/unix/bsd/netbsdlike/openbsd/mips64.rs", + "src/unix/linux_like/linux/arch/mips", + "src/unix/linux_like/linux/gnu/b32/mips", + "src/unix/linux_like/linux/gnu/b64/mips64", + "src/unix/linux_like/linux/musl/b32/mips", + "src/unix/linux_like/linux/musl/b64/mips64.rs", + "src/unix/linux_like/linux/uclibc/mips", +] + +[autolabel."O-musl"] +trigger_files = ["src/unix/linux_like/linux/musl"] + +[autolabel."O-newlib"] +trigger_files = ["src/unix/newlib"] + +[autolabel."O-redox"] +trigger_files = ["src/unix/redox"] + +[autolabel."O-riscv"] +trigger_files = [ + "src/fuchsia/riscv64.rs", + "src/unix/bsd/freebsdlike/freebsd/riscv64.rs", + "src/unix/bsd/netbsdlike/netbsd/riscv64.rs", + "src/unix/bsd/netbsdlike/openbsd/riscv64.rs", + "src/unix/linux_like/android/b64/riscv64", + "src/unix/linux_like/linux/gnu/b32/riscv32", + "src/unix/linux_like/linux/gnu/b64/riscv64", + "src/unix/linux_like/linux/musl/b32/riscv32", + "src/unix/linux_like/linux/musl/b64/riscv64", + "src/vxworks/riscv32.rs", + "src/vxworks/riscv64.rs", +] + +[autolabel."O-solarish"] +trigger_files = ["src/unix/solarish"] + +[autolabel."O-sparc"] +trigger_files = [ + "src/unix/bsd/netbsdlike/netbsd/sparc64.rs", + "src/unix/bsd/netbsdlike/openbsd/sparc64.rs", + "src/unix/linux_like/linux/arch/sparc", + "src/unix/linux_like/linux/gnu/b32/sparc", + "src/unix/linux_like/linux/gnu/b64/sparc64", +] + +[autolabel."O-unix"] +trigger_files = ["src/unix"] + +[autolabel."O-wasi"] +trigger_files = ["src/wasi"] + +[autolabel."O-wasm"] +trigger_files = ["src/"] + +[autolabel."O-windows"] +trigger_files = ["src/windows"] + +[autolabel."O-x86"] +trigger_files = [ + "src/fuchsia/x86_64.rs", + "src/unix/bsd/apple/b64/x86_64", + "src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs", + "src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs", + "src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs", + "src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs", + "src/unix/bsd/freebsdlike/freebsd/x86.rs", + "src/unix/bsd/freebsdlike/freebsd/x86_64", + "src/unix/bsd/netbsdlike/netbsd/x86.rs", + "src/unix/bsd/netbsdlike/netbsd/x86_64.rs", + "src/unix/bsd/netbsdlike/openbsd/x86.rs", + "src/unix/bsd/netbsdlike/openbsd/x86_64.rs", + "src/unix/haiku/x86_64.rs", + "src/unix/linux_like/android/b32/x86", + "src/unix/linux_like/android/b64/x86_64", + "src/unix/linux_like/linux/gnu/b32/x86", + "src/unix/linux_like/linux/gnu/b64/x86_64", + "src/unix/linux_like/linux/musl/b32/x86", + "src/unix/linux_like/linux/musl/b64/x86_64", + "src/unix/linux_like/linux/uclibc/x86_64", + "src/unix/nto/x86_64.rs", + "src/unix/solarish/x86.rs", + "src/unix/solarish/x86_64.rs", + "src/unix/solarish/x86_common.rs", + "src/vxworks/x86.rs", + "src/vxworks/x86_64.rs", +] + +[review-submitted] +# These labels are removed when a review is submitted. +review_labels = ["S-waiting-on-review"] +# This label is added when a review is submitted. +reviewed_label = "S-waiting-on-author" + +[review-requested] +# Those labels are removed when PR author requests a review from an assignee +remove_labels = ["S-waiting-on-author"] +# Those labels are added when PR author requests a review from an assignee +add_labels = ["S-waiting-on-review"] + +[shortcut] + [mentions."src/unix/bsd/netbsdlike/openbsd"] message = "Some changes occurred in OpenBSD module" cc = ["@semarie"] @@ -23,5 +168,3 @@ cc = ["@semarie"] [mentions."src/unix/solarish"] message = "Some changes occurred in solarish module" cc = ["@jclulow", "@pfmooney"] - -[shortcut] From 58dcc8af13d9e89d6a02e88a924b7680903e2341 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Thu, 7 Nov 2024 10:08:14 +0100 Subject: [PATCH 4/9] emscripten: Remove `aio.h` usage See: emscripten-core/emscripten@6416c351c6d98b796dfefd8a8d00d71e83ca7fa5. (backport ) (cherry picked from commit 01c72ee99a0c6ba5bbb393ab3ef486ba06ccb0e9) --- libc-test/build.rs | 6 +----- src/unix/linux_like/emscripten/mod.rs | 26 -------------------------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 0dc9c9ff53064..75a50afc2f810 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2794,7 +2794,6 @@ fn test_emscripten(target: &str) { cfg.define("_GNU_SOURCE", None); // FIXME: ?? headers! { cfg: - "aio.h", "ctype.h", "dirent.h", "dlfcn.h", @@ -3019,10 +3018,7 @@ fn test_emscripten(target: &str) { (struct_ == "sigaction" && field == "sa_sigaction") || // sigval is actually a union, but we pretend it's a struct // FIXME: is this necessary? - (struct_ == "sigevent" && field == "sigev_value") || - // aio_buf is "volatile void*" and Rust doesn't understand volatile - // FIXME: is this necessary? - (struct_ == "aiocb" && field == "aio_buf") + (struct_ == "sigevent" && field == "sigev_value") }); cfg.skip_field(move |struct_, field| { diff --git a/src/unix/linux_like/emscripten/mod.rs b/src/unix/linux_like/emscripten/mod.rs index 393244d9996f2..2559b3285880a 100644 --- a/src/unix/linux_like/emscripten/mod.rs +++ b/src/unix/linux_like/emscripten/mod.rs @@ -171,23 +171,6 @@ s! { pub sem_flg: ::c_short, } - pub struct aiocb { - pub aio_fildes: ::c_int, - pub aio_lio_opcode: ::c_int, - pub aio_reqprio: ::c_int, - pub aio_buf: *mut ::c_void, - pub aio_nbytes: ::size_t, - pub aio_sigevent: ::sigevent, - __td: *mut ::c_void, - __lock: [::c_int; 2], - __err: ::c_int, - __ret: ::ssize_t, - pub aio_offset: off_t, - __next: *mut ::c_void, - __prev: *mut ::c_void, - __dummy4: [::c_char; 24], - } - pub struct sigaction { pub sa_sigaction: ::sighandler_t, pub sa_mask: ::sigset_t, @@ -917,15 +900,6 @@ pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4; pub const EAI_SYSTEM: ::c_int = -11; -pub const AIO_CANCELED: ::c_int = 0; -pub const AIO_NOTCANCELED: ::c_int = 1; -pub const AIO_ALLDONE: ::c_int = 2; -pub const LIO_READ: ::c_int = 0; -pub const LIO_WRITE: ::c_int = 1; -pub const LIO_NOP: ::c_int = 2; -pub const LIO_WAIT: ::c_int = 0; -pub const LIO_NOWAIT: ::c_int = 1; - pub const MREMAP_MAYMOVE: ::c_int = 1; pub const MREMAP_FIXED: ::c_int = 2; From 7e5427f0156051578be0631c1be21f4a67732326 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Thu, 7 Nov 2024 12:00:30 +0100 Subject: [PATCH 5/9] emscripten: Remove `sys/sysctl.h` usage See: emscripten-core/emscripten@15f763203ce5aa382f38b54a68b9370afe40c18a. (backport ) (cherry picked from commit 6670ab287bed1fe9bbe8c71dd525b6edb76b6ed8) --- libc-test/build.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 75a50afc2f810..e5e9e84579946 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2856,7 +2856,6 @@ fn test_emscripten(target: &str) { "sys/statvfs.h", "sys/swap.h", "sys/syscall.h", - "sys/sysctl.h", "sys/sysinfo.h", "sys/time.h", "sys/timerfd.h", From 51248a555fd5c8ab29edfd5801de5a697d105be2 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Thu, 7 Nov 2024 10:13:28 +0100 Subject: [PATCH 6/9] emscripten: Remove Linux-specific implementations See: emscripten-core/emscripten@655ad88e65298014a2a37aae88a5b2f9ab3e36f7. (backport ) (cherry picked from commit 0df7c93d966cc0338deafdae290ad7eb5ee84b69) --- libc-test/build.rs | 52 ++++--- src/unix/linux_like/emscripten/mod.rs | 192 -------------------------- 2 files changed, 29 insertions(+), 215 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index e5e9e84579946..5d891ba0b95d9 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2834,31 +2834,21 @@ fn test_emscripten(target: &str) { "stdio.h", "stdlib.h", "string.h", - "sys/epoll.h", - "sys/eventfd.h", "sys/file.h", "sys/ioctl.h", "sys/ipc.h", "sys/mman.h", "sys/mount.h", "sys/msg.h", - "sys/personality.h", - "sys/prctl.h", - "sys/ptrace.h", - "sys/quota.h", - "sys/reboot.h", "sys/resource.h", "sys/sem.h", "sys/shm.h", - "sys/signalfd.h", "sys/socket.h", "sys/stat.h", "sys/statvfs.h", - "sys/swap.h", "sys/syscall.h", "sys/sysinfo.h", "sys/time.h", - "sys/timerfd.h", "sys/times.h", "sys/types.h", "sys/uio.h", @@ -2884,8 +2874,6 @@ fn test_emscripten(target: &str) { // Just pass all these through, no need for a "struct" prefix "FILE" | "fd_set" | "Dl_info" | "DIR" => ty.to_string(), - "os_unfair_lock" => "struct os_unfair_lock_s".to_string(), - // LFS64 types have been removed in Emscripten 3.1.44+ // https://github.com/emscripten-core/emscripten/pull/19812 "off64_t" => "off_t".to_string(), @@ -2922,6 +2910,10 @@ fn test_emscripten(target: &str) { // FIXME: is this necessary? "sighandler_t" => true, + // No epoll support + // https://github.com/emscripten-core/emscripten/issues/5033 + ty if ty.starts_with("epoll") => true, + // FIXME: The size has been changed due to musl's time64 "time_t" => true, @@ -2948,6 +2940,11 @@ fn test_emscripten(target: &str) { // FIXME: The size has been changed when upgraded to musl 1.2.2 "pthread_mutex_t" => true, + // No epoll support + // https://github.com/emscripten-core/emscripten/issues/5033 + ty if ty.starts_with("epoll") => true, + ty if ty.starts_with("signalfd") => true, + // FIXME: Lowered from 16 to 8 bytes in // llvm/llvm-project@d1a96e9 "max_align_t" => true, @@ -2984,10 +2981,30 @@ fn test_emscripten(target: &str) { // FIXME: emscripten uses different constants to constructs these n if n.contains("__SIZEOF_PTHREAD") => true, + // No epoll support + // https://github.com/emscripten-core/emscripten/issues/5033 + n if n.starts_with("EPOLL") => true, + + // No ptrace.h + // https://github.com/emscripten-core/emscripten/pull/17704 + n if n.starts_with("PTRACE_") => true, + + // No quota.h + // https://github.com/emscripten-core/emscripten/pull/17704 + n if n.starts_with("QIF_") => true, + "USRQUOTA" | "GRPQUOTA" | "Q_GETFMT" | "Q_GETINFO" | "Q_SETINFO" | "Q_SYNC" + | "Q_QUOTAON" | "Q_QUOTAOFF" | "Q_GETQUOTA" | "Q_SETQUOTA" => true, + // FIXME: `SYS_gettid` was removed in // emscripten-core/emscripten@6d6474e "SYS_gettid" => true, + // No personality.h + // https://github.com/emscripten-core/emscripten/pull/17704 + "ADDR_NO_RANDOMIZE" | "MMAP_PAGE_ZERO" | "ADDR_COMPAT_LAYOUT" | "READ_IMPLIES_EXEC" + | "ADDR_LIMIT_32BIT" | "SHORT_INODE" | "WHOLE_SECONDS" | "STICKY_TIMEOUTS" + | "ADDR_LIMIT_3GB" => true, + // FIXME: These values have been changed | "POSIX_MADV_DONTNEED" // to 4 | "RLIMIT_NLIMITS" // to 16 @@ -3028,17 +3045,6 @@ fn test_emscripten(target: &str) { // musl names this __dummy1 but it's still there // FIXME: is this necessary? (struct_ == "glob_t" && field == "gl_flags") || - // musl seems to define this as an *anonymous* bitfield - // FIXME: is this necessary? - (struct_ == "statvfs" && field == "__f_unused") || - // sigev_notify_thread_id is actually part of a sigev_un union - (struct_ == "sigevent" && field == "sigev_notify_thread_id") || - // signalfd had SIGSYS fields added in Linux 4.18, but no libc release has them yet. - (struct_ == "signalfd_siginfo" && (field == "ssi_addr_lsb" || - field == "_pad2" || - field == "ssi_syscall" || - field == "ssi_call_addr" || - field == "ssi_arch")) || // FIXME: After musl 1.1.24, it have only one field `sched_priority`, // while other fields become reserved. (struct_ == "sched_param" && [ diff --git a/src/unix/linux_like/emscripten/mod.rs b/src/unix/linux_like/emscripten/mod.rs index 2559b3285880a..cfaff7f2bfaf7 100644 --- a/src/unix/linux_like/emscripten/mod.rs +++ b/src/unix/linux_like/emscripten/mod.rs @@ -103,18 +103,6 @@ s! { __f_spare: [::c_int; 6], } - pub struct dqblk { - pub dqb_bhardlimit: u64, - pub dqb_bsoftlimit: u64, - pub dqb_curspace: u64, - pub dqb_ihardlimit: u64, - pub dqb_isoftlimit: u64, - pub dqb_curinodes: u64, - pub dqb_btime: u64, - pub dqb_itime: u64, - pub dqb_valid: u32, - } - pub struct signalfd_siginfo { pub ssi_signo: u32, pub ssi_errno: i32, @@ -852,23 +840,10 @@ pub const SHM_UNLOCK: ::c_int = 12; pub const SHM_HUGETLB: ::c_int = 0o4000; pub const SHM_NORESERVE: ::c_int = 0o10000; -pub const QFMT_VFS_OLD: ::c_int = 1; -pub const QFMT_VFS_V0: ::c_int = 2; - -pub const EFD_SEMAPHORE: ::c_int = 0x1; - pub const LOG_NFACILITIES: ::c_int = 24; pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t; -pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32; -pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123u32 as i32; -pub const RB_ENABLE_CAD: ::c_int = 0x89abcdefu32 as i32; -pub const RB_DISABLE_CAD: ::c_int = 0x00000000u32 as i32; -pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32; -pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2u32 as i32; -pub const RB_KEXEC: ::c_int = 0x45584543u32 as i32; - pub const AI_PASSIVE: ::c_int = 0x0001; pub const AI_CANONNAME: ::c_int = 0x0002; pub const AI_NUMERICHOST: ::c_int = 0x0004; @@ -903,127 +878,6 @@ pub const EAI_SYSTEM: ::c_int = -11; pub const MREMAP_MAYMOVE: ::c_int = 1; pub const MREMAP_FIXED: ::c_int = 2; -pub const PR_SET_PDEATHSIG: ::c_int = 1; -pub const PR_GET_PDEATHSIG: ::c_int = 2; - -pub const PR_GET_DUMPABLE: ::c_int = 3; -pub const PR_SET_DUMPABLE: ::c_int = 4; - -pub const PR_GET_UNALIGN: ::c_int = 5; -pub const PR_SET_UNALIGN: ::c_int = 6; -pub const PR_UNALIGN_NOPRINT: ::c_int = 1; -pub const PR_UNALIGN_SIGBUS: ::c_int = 2; - -pub const PR_GET_KEEPCAPS: ::c_int = 7; -pub const PR_SET_KEEPCAPS: ::c_int = 8; - -pub const PR_GET_FPEMU: ::c_int = 9; -pub const PR_SET_FPEMU: ::c_int = 10; -pub const PR_FPEMU_NOPRINT: ::c_int = 1; -pub const PR_FPEMU_SIGFPE: ::c_int = 2; - -pub const PR_GET_FPEXC: ::c_int = 11; -pub const PR_SET_FPEXC: ::c_int = 12; -pub const PR_FP_EXC_SW_ENABLE: ::c_int = 0x80; -pub const PR_FP_EXC_DIV: ::c_int = 0x010000; -pub const PR_FP_EXC_OVF: ::c_int = 0x020000; -pub const PR_FP_EXC_UND: ::c_int = 0x040000; -pub const PR_FP_EXC_RES: ::c_int = 0x080000; -pub const PR_FP_EXC_INV: ::c_int = 0x100000; -pub const PR_FP_EXC_DISABLED: ::c_int = 0; -pub const PR_FP_EXC_NONRECOV: ::c_int = 1; -pub const PR_FP_EXC_ASYNC: ::c_int = 2; -pub const PR_FP_EXC_PRECISE: ::c_int = 3; - -pub const PR_GET_TIMING: ::c_int = 13; -pub const PR_SET_TIMING: ::c_int = 14; -pub const PR_TIMING_STATISTICAL: ::c_int = 0; -pub const PR_TIMING_TIMESTAMP: ::c_int = 1; - -pub const PR_SET_NAME: ::c_int = 15; -pub const PR_GET_NAME: ::c_int = 16; - -pub const PR_GET_ENDIAN: ::c_int = 19; -pub const PR_SET_ENDIAN: ::c_int = 20; -pub const PR_ENDIAN_BIG: ::c_int = 0; -pub const PR_ENDIAN_LITTLE: ::c_int = 1; -pub const PR_ENDIAN_PPC_LITTLE: ::c_int = 2; - -pub const PR_GET_SECCOMP: ::c_int = 21; -pub const PR_SET_SECCOMP: ::c_int = 22; - -pub const PR_CAPBSET_READ: ::c_int = 23; -pub const PR_CAPBSET_DROP: ::c_int = 24; - -pub const PR_GET_TSC: ::c_int = 25; -pub const PR_SET_TSC: ::c_int = 26; -pub const PR_TSC_ENABLE: ::c_int = 1; -pub const PR_TSC_SIGSEGV: ::c_int = 2; - -pub const PR_GET_SECUREBITS: ::c_int = 27; -pub const PR_SET_SECUREBITS: ::c_int = 28; - -pub const PR_SET_TIMERSLACK: ::c_int = 29; -pub const PR_GET_TIMERSLACK: ::c_int = 30; - -pub const PR_TASK_PERF_EVENTS_DISABLE: ::c_int = 31; -pub const PR_TASK_PERF_EVENTS_ENABLE: ::c_int = 32; - -pub const PR_MCE_KILL: ::c_int = 33; -pub const PR_MCE_KILL_CLEAR: ::c_int = 0; -pub const PR_MCE_KILL_SET: ::c_int = 1; - -pub const PR_MCE_KILL_LATE: ::c_int = 0; -pub const PR_MCE_KILL_EARLY: ::c_int = 1; -pub const PR_MCE_KILL_DEFAULT: ::c_int = 2; - -pub const PR_MCE_KILL_GET: ::c_int = 34; - -pub const PR_SET_MM: ::c_int = 35; -pub const PR_SET_MM_START_CODE: ::c_int = 1; -pub const PR_SET_MM_END_CODE: ::c_int = 2; -pub const PR_SET_MM_START_DATA: ::c_int = 3; -pub const PR_SET_MM_END_DATA: ::c_int = 4; -pub const PR_SET_MM_START_STACK: ::c_int = 5; -pub const PR_SET_MM_START_BRK: ::c_int = 6; -pub const PR_SET_MM_BRK: ::c_int = 7; -pub const PR_SET_MM_ARG_START: ::c_int = 8; -pub const PR_SET_MM_ARG_END: ::c_int = 9; -pub const PR_SET_MM_ENV_START: ::c_int = 10; -pub const PR_SET_MM_ENV_END: ::c_int = 11; -pub const PR_SET_MM_AUXV: ::c_int = 12; -pub const PR_SET_MM_EXE_FILE: ::c_int = 13; -pub const PR_SET_MM_MAP: ::c_int = 14; -pub const PR_SET_MM_MAP_SIZE: ::c_int = 15; - -pub const PR_SET_PTRACER: ::c_int = 0x59616d61; -pub const PR_SET_PTRACER_ANY: ::c_ulong = 0xffffffffffffffff; - -pub const PR_SET_CHILD_SUBREAPER: ::c_int = 36; -pub const PR_GET_CHILD_SUBREAPER: ::c_int = 37; - -pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38; -pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39; - -pub const PR_GET_TID_ADDRESS: ::c_int = 40; - -pub const PR_SET_THP_DISABLE: ::c_int = 41; -pub const PR_GET_THP_DISABLE: ::c_int = 42; - -pub const PR_MPX_ENABLE_MANAGEMENT: ::c_int = 43; -pub const PR_MPX_DISABLE_MANAGEMENT: ::c_int = 44; - -pub const PR_SET_FP_MODE: ::c_int = 45; -pub const PR_GET_FP_MODE: ::c_int = 46; -pub const PR_FP_MODE_FR: ::c_int = 1 << 0; -pub const PR_FP_MODE_FRE: ::c_int = 1 << 1; - -pub const PR_CAP_AMBIENT: ::c_int = 47; -pub const PR_CAP_AMBIENT_IS_SET: ::c_int = 1; -pub const PR_CAP_AMBIENT_RAISE: ::c_int = 2; -pub const PR_CAP_AMBIENT_LOWER: ::c_int = 3; -pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4; - pub const ITIMER_REAL: ::c_int = 0; pub const ITIMER_VIRTUAL: ::c_int = 1; pub const ITIMER_PROF: ::c_int = 2; @@ -1033,11 +887,6 @@ pub const _POSIX_VDISABLE: ::cc_t = 0; pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01; pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02; -// On Linux, libc doesn't define this constant, libattr does instead. -// We still define it for Linux as it's defined by libc on other platforms, -// and it's mentioned in the man pages for getxattr and setxattr. -pub const SFD_CLOEXEC: ::c_int = 0x080000; - pub const NCCS: usize = 32; pub const O_TRUNC: ::c_int = 512; @@ -1186,10 +1035,6 @@ pub const SA_RESETHAND: ::c_int = 0x80000000; pub const SA_RESTART: ::c_int = 0x10000000; pub const SA_NOCLDSTOP: ::c_int = 0x00000001; -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; - -pub const EFD_CLOEXEC: ::c_int = 0x80000; - pub const BUFSIZ: ::c_uint = 1024; pub const TMP_MAX: ::c_uint = 10000; pub const FOPEN_MAX: ::c_uint = 1000; @@ -1224,43 +1069,6 @@ pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8; pub const CPU_SETSIZE: ::c_int = 128; -pub const QFMT_VFS_V1: ::c_int = 4; - -pub const PTRACE_TRACEME: ::c_int = 0; -pub const PTRACE_PEEKTEXT: ::c_int = 1; -pub const PTRACE_PEEKDATA: ::c_int = 2; -pub const PTRACE_PEEKUSER: ::c_int = 3; -pub const PTRACE_POKETEXT: ::c_int = 4; -pub const PTRACE_POKEDATA: ::c_int = 5; -pub const PTRACE_POKEUSER: ::c_int = 6; -pub const PTRACE_CONT: ::c_int = 7; -pub const PTRACE_KILL: ::c_int = 8; -pub const PTRACE_SINGLESTEP: ::c_int = 9; -pub const PTRACE_ATTACH: ::c_int = 16; -pub const PTRACE_DETACH: ::c_int = 17; -pub const PTRACE_SYSCALL: ::c_int = 24; -pub const PTRACE_SETOPTIONS: ::c_int = 0x4200; -pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201; -pub const PTRACE_GETSIGINFO: ::c_int = 0x4202; -pub const PTRACE_SETSIGINFO: ::c_int = 0x4203; -pub const PTRACE_GETREGSET: ::c_int = 0x4204; -pub const PTRACE_SETREGSET: ::c_int = 0x4205; -pub const PTRACE_SEIZE: ::c_int = 0x4206; -pub const PTRACE_INTERRUPT: ::c_int = 0x4207; -pub const PTRACE_LISTEN: ::c_int = 0x4208; -pub const PTRACE_PEEKSIGINFO: ::c_int = 0x4209; - -pub const PTRACE_GETFPREGS: ::c_uint = 14; -pub const PTRACE_SETFPREGS: ::c_uint = 15; -pub const PTRACE_GETFPXREGS: ::c_uint = 18; -pub const PTRACE_SETFPXREGS: ::c_uint = 19; -pub const PTRACE_GETREGS: ::c_uint = 12; -pub const PTRACE_SETREGS: ::c_uint = 13; - -pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK; - -pub const SFD_NONBLOCK: ::c_int = ::O_NONBLOCK; - pub const TCSANOW: ::c_int = 0; pub const TCSADRAIN: ::c_int = 1; pub const TCSAFLUSH: ::c_int = 2; From eb821a3a8688b52799c388927d67f267f6fd326f Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Wed, 13 Nov 2024 09:57:33 +0100 Subject: [PATCH 7/9] emscripten: Lower `max_align_t` from 16 to 8 bytes See: llvm/llvm-project@d1a96e906cc03a95cfd41a1f22bdda92651250c7. (backport ) (cherry picked from commit 99035d7fa369be695f8b41221a95d73c052c3916) --- libc-test/build.rs | 4 ---- src/unix/linux_like/emscripten/align.rs | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 5d891ba0b95d9..7645c20106be7 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2945,10 +2945,6 @@ fn test_emscripten(target: &str) { ty if ty.starts_with("epoll") => true, ty if ty.starts_with("signalfd") => true, - // FIXME: Lowered from 16 to 8 bytes in - // llvm/llvm-project@d1a96e9 - "max_align_t" => true, - // FIXME: The size has been changed due to time64 "utimbuf" | "timeval" | "timespec" | "rusage" | "itimerval" | "sched_param" | "stat" | "stat64" | "shmid_ds" | "msqid_ds" => true, diff --git a/src/unix/linux_like/emscripten/align.rs b/src/unix/linux_like/emscripten/align.rs index b9ea3f39efdf5..015690eedae45 100644 --- a/src/unix/linux_like/emscripten/align.rs +++ b/src/unix/linux_like/emscripten/align.rs @@ -38,9 +38,9 @@ macro_rules! expand_align { } #[allow(missing_debug_implementations)] - #[repr(align(16))] + #[repr(align(8))] pub struct max_align_t { - priv_: [f64; 4] + priv_: [f64; 3] } } From 4aa7cca2ab03f13921f7f6915c8a9fbc0b31123f Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Thu, 7 Nov 2024 10:48:06 +0100 Subject: [PATCH 8/9] emscripten: Upgrade emsdk to 3.1.68 In line with commit rust-lang/rust@2c38ecfc9077000db7de14bf501fa5294eeecedd. Notable changes: - `time_t` changed to 64-bit. emscripten-core/emscripten@c8857a6152c3954014d2aefb706471ee4c80fe30 (backport ) (cherry picked from commit 3e825311dc999a3f2da67ca1afe47309d3d73950) --- ci/emscripten.sh | 6 +-- libc-test/build.rs | 55 ++++++--------------------- src/unix/linux_like/emscripten/mod.rs | 26 +++++-------- 3 files changed, 25 insertions(+), 62 deletions(-) diff --git a/ci/emscripten.sh b/ci/emscripten.sh index 44da97c93ee68..b99d2cfbe5397 100644 --- a/ci/emscripten.sh +++ b/ci/emscripten.sh @@ -2,9 +2,9 @@ set -ex -# FIXME: 3.1.21 removed a lot of header files (https://github.com/emscripten-core/emscripten/pull/17704). -# We have to tweak libc-test (and deprecate unsupported items, maybe) when updating emsdk. -EMSDK_VERSION=3.1.20 +# Note: keep in sync with: +# https://github.com/rust-lang/rust/blob/master/src/ci/docker/scripts/emscripten.sh +EMSDK_VERSION=3.1.68 git clone https://github.com/emscripten-core/emsdk.git /emsdk-portable cd /emsdk-portable diff --git a/libc-test/build.rs b/libc-test/build.rs index 7645c20106be7..37ca243033ca8 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2874,7 +2874,7 @@ fn test_emscripten(target: &str) { // Just pass all these through, no need for a "struct" prefix "FILE" | "fd_set" | "Dl_info" | "DIR" => ty.to_string(), - // LFS64 types have been removed in Emscripten 3.1.44+ + // LFS64 types have been removed in Emscripten 3.1.44 // https://github.com/emscripten-core/emscripten/pull/19812 "off64_t" => "off_t".to_string(), @@ -2898,7 +2898,7 @@ fn test_emscripten(target: &str) { s if s.ends_with("_nsec") && struct_.starts_with("stat") => { s.replace("e_nsec", ".tv_nsec") } - // FIXME: appears that `epoll_event.data` is an union + // Rust struct uses raw u64, rather than union "u64" if struct_ == "epoll_event" => "data.u64".to_string(), s => s.to_string(), } @@ -2914,10 +2914,7 @@ fn test_emscripten(target: &str) { // https://github.com/emscripten-core/emscripten/issues/5033 ty if ty.starts_with("epoll") => true, - // FIXME: The size has been changed due to musl's time64 - "time_t" => true, - - // LFS64 types have been removed in Emscripten 3.1.44+ + // LFS64 types have been removed in Emscripten 3.1.44 // https://github.com/emscripten-core/emscripten/pull/19812 t => t.ends_with("64") || t.ends_with("64_t"), } @@ -2926,30 +2923,19 @@ fn test_emscripten(target: &str) { cfg.skip_struct(move |ty| { match ty { // This is actually a union, not a struct - // FIXME: is this necessary? "sigval" => true, - // FIXME: It was removed in - // emscripten-core/emscripten@953e414 - "pthread_mutexattr_t" => true, - // FIXME: Investigate why the test fails. // Skip for now to unblock CI. "pthread_condattr_t" => true, - - // FIXME: The size has been changed when upgraded to musl 1.2.2 - "pthread_mutex_t" => true, + "pthread_mutexattr_t" => true, // No epoll support // https://github.com/emscripten-core/emscripten/issues/5033 ty if ty.starts_with("epoll") => true, ty if ty.starts_with("signalfd") => true, - // FIXME: The size has been changed due to time64 - "utimbuf" | "timeval" | "timespec" | "rusage" | "itimerval" | "sched_param" - | "stat" | "stat64" | "shmid_ds" | "msqid_ds" => true, - - // LFS64 types have been removed in Emscripten 3.1.44+ + // LFS64 types have been removed in Emscripten 3.1.44 // https://github.com/emscripten-core/emscripten/pull/19812 ty => ty.ends_with("64") || ty.ends_with("64_t"), } @@ -2958,12 +2944,9 @@ fn test_emscripten(target: &str) { cfg.skip_fn(move |name| { match name { // Emscripten does not support fork/exec/wait or any kind of multi-process support - // https://github.com/emscripten-core/emscripten/blob/3.1.30/tools/system_libs.py#L973 + // https://github.com/emscripten-core/emscripten/blob/3.1.68/tools/system_libs.py#L1100 "execv" | "execve" | "execvp" | "execvpe" | "fexecve" | "wait4" => true, - // FIXME: Remove after emscripten-core/emscripten#18492 is released (> 3.1.30). - "clearenv" => true, - _ => false, } }); @@ -2991,8 +2974,8 @@ fn test_emscripten(target: &str) { "USRQUOTA" | "GRPQUOTA" | "Q_GETFMT" | "Q_GETINFO" | "Q_SETINFO" | "Q_SYNC" | "Q_QUOTAON" | "Q_QUOTAOFF" | "Q_GETQUOTA" | "Q_SETQUOTA" => true, - // FIXME: `SYS_gettid` was removed in - // emscripten-core/emscripten@6d6474e + // `SYS_gettid` was removed in Emscripten v1.39.9 + // https://github.com/emscripten-core/emscripten/pull/10439 "SYS_gettid" => true, // No personality.h @@ -3001,19 +2984,11 @@ fn test_emscripten(target: &str) { | "ADDR_LIMIT_32BIT" | "SHORT_INODE" | "WHOLE_SECONDS" | "STICKY_TIMEOUTS" | "ADDR_LIMIT_3GB" => true, - // FIXME: These values have been changed - | "POSIX_MADV_DONTNEED" // to 4 - | "RLIMIT_NLIMITS" // to 16 - | "RLIM_NLIMITS" // to 16 - | "IPPROTO_MAX" // to 263 - | "F_GETLK" // to 5 - | "F_SETLK" // to 6 - | "F_SETLKW" // to 7 - | "O_TMPFILE" // to 65 - | "SIG_IGN" // -1 - => true, + // `SIG_IGN` has been changed to -2 since 1 is a valid function address + // https://github.com/emscripten-core/emscripten/pull/14883 + "SIG_IGN" => true, - // LFS64 types have been removed in Emscripten 3.1.44+ + // LFS64 types have been removed in Emscripten 3.1.44 // https://github.com/emscripten-core/emscripten/pull/19812 n if n.starts_with("RLIM64") => true, @@ -3023,23 +2998,18 @@ fn test_emscripten(target: &str) { cfg.skip_field_type(move |struct_, field| { // This is a weird union, don't check the type. - // FIXME: is this necessary? (struct_ == "ifaddrs" && field == "ifa_ifu") || // sighandler_t type is super weird - // FIXME: is this necessary? (struct_ == "sigaction" && field == "sa_sigaction") || // sigval is actually a union, but we pretend it's a struct - // FIXME: is this necessary? (struct_ == "sigevent" && field == "sigev_value") }); cfg.skip_field(move |struct_, field| { // this is actually a union on linux, so we can't represent it well and // just insert some padding. - // FIXME: is this necessary? (struct_ == "siginfo_t" && field == "_pad") || // musl names this __dummy1 but it's still there - // FIXME: is this necessary? (struct_ == "glob_t" && field == "gl_flags") || // FIXME: After musl 1.1.24, it have only one field `sched_priority`, // while other fields become reserved. @@ -3051,7 +3021,6 @@ fn test_emscripten(target: &str) { ].contains(&field)) }); - // FIXME: test linux like cfg.generate("../src/lib.rs", "main.rs"); } diff --git a/src/unix/linux_like/emscripten/mod.rs b/src/unix/linux_like/emscripten/mod.rs index cfaff7f2bfaf7..5fe0ed0933012 100644 --- a/src/unix/linux_like/emscripten/mod.rs +++ b/src/unix/linux_like/emscripten/mod.rs @@ -16,7 +16,7 @@ pub type loff_t = i64; pub type pthread_key_t = ::c_uint; pub type clock_t = c_long; -pub type time_t = c_long; +pub type time_t = i64; pub type suseconds_t = c_long; pub type ino_t = u64; pub type off_t = i64; @@ -259,11 +259,8 @@ s! { pub shm_perm: ::ipc_perm, pub shm_segsz: ::size_t, pub shm_atime: ::time_t, - __unused1: ::c_int, pub shm_dtime: ::time_t, - __unused2: ::c_int, pub shm_ctime: ::time_t, - __unused3: ::c_int, pub shm_cpid: ::pid_t, pub shm_lpid: ::pid_t, pub shm_nattch: ::c_ulong, @@ -274,11 +271,8 @@ s! { pub struct msqid_ds { pub msg_perm: ::ipc_perm, pub msg_stime: ::time_t, - __unused1: ::c_int, pub msg_rtime: ::time_t, - __unused2: ::c_int, pub msg_ctime: ::time_t, - __unused3: ::c_int, __msg_cbytes: ::c_ulong, pub msg_qnum: ::msgqnum_t, pub msg_qbytes: ::msglen_t, @@ -1048,11 +1042,11 @@ pub const PTHREAD_STACK_MIN: ::size_t = 2048; pub const POSIX_FADV_DONTNEED: ::c_int = 4; pub const POSIX_FADV_NOREUSE: ::c_int = 5; -pub const POSIX_MADV_DONTNEED: ::c_int = 0; +pub const POSIX_MADV_DONTNEED: ::c_int = 4; pub const RLIM_INFINITY: ::rlim_t = !0; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIMIT_NLIMITS: ::c_int = 15; +pub const RLIMIT_NLIMITS: ::c_int = 16; #[allow(deprecated)] #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: ::c_int = RLIMIT_NLIMITS; @@ -1067,7 +1061,7 @@ pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8; -pub const CPU_SETSIZE: ::c_int = 128; +pub const CPU_SETSIZE: ::c_int = 1024; pub const TCSANOW: ::c_int = 0; pub const TCSADRAIN: ::c_int = 1; @@ -1169,14 +1163,14 @@ pub const B3500000: ::speed_t = 0o010016; pub const B4000000: ::speed_t = 0o010017; pub const SO_BINDTODEVICE: ::c_int = 25; -pub const SO_TIMESTAMP: ::c_int = 29; +pub const SO_TIMESTAMP: ::c_int = 63; pub const SO_MARK: ::c_int = 36; pub const SO_RXQ_OVFL: ::c_int = 40; pub const SO_PEEK_OFF: ::c_int = 42; pub const SO_BUSY_POLL: ::c_int = 46; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; -pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 28; +pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; pub const O_DIRECT: ::c_int = 0x4000; pub const O_DIRECTORY: ::c_int = 0x10000; @@ -1227,7 +1221,7 @@ pub const SOCK_STREAM: ::c_int = 1; pub const SOCK_DGRAM: ::c_int = 2; pub const SOCK_SEQPACKET: ::c_int = 5; -pub const IPPROTO_MAX: ::c_int = 256; +pub const IPPROTO_MAX: ::c_int = 263; pub const SOL_SOCKET: ::c_int = 1; @@ -1244,8 +1238,8 @@ pub const SO_LINGER: ::c_int = 13; pub const SO_REUSEPORT: ::c_int = 15; pub const SO_RCVLOWAT: ::c_int = 18; pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; +pub const SO_RCVTIMEO: ::c_int = 66; +pub const SO_SNDTIMEO: ::c_int = 67; pub const SO_ACCEPTCONN: ::c_int = 30; pub const IPV6_RTHDR_LOOSE: ::c_int = 0; @@ -1347,7 +1341,7 @@ pub const TIOCM_RNG: ::c_int = 0x080; pub const TIOCM_DSR: ::c_int = 0x100; pub const TIOCM_CD: ::c_int = TIOCM_CAR; pub const TIOCM_RI: ::c_int = TIOCM_RNG; -pub const O_TMPFILE: ::c_int = 0x400000; +pub const O_TMPFILE: ::c_int = 0x410000; pub const MAX_ADDR_LEN: usize = 7; pub const ARPD_UPDATE: ::c_ushort = 0x01; From 6c8488ae87528fe37f3b51cee6171541cb8930ef Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 13 Nov 2024 19:37:05 -0500 Subject: [PATCH 9/9] triagebot: Don't label everything as O-wasm (backport ) (cherry picked from commit 16dc9170b21880a0bdce5e54ef34ab4eefa93cda) --- triagebot.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/triagebot.toml b/triagebot.toml index 3183d723f1cb8..25a0a80478b1f 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -107,9 +107,6 @@ trigger_files = ["src/unix"] [autolabel."O-wasi"] trigger_files = ["src/wasi"] -[autolabel."O-wasm"] -trigger_files = ["src/"] - [autolabel."O-windows"] trigger_files = ["src/windows"]