From b63b6266244c0a3ea60396ec76c56d8cd96ac0cd Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Tue, 26 Mar 2024 20:33:57 +0000 Subject: [PATCH 1/5] illumos: expose `PIPE_BUF` constant (backport ) (cherry picked from commit 64d8a2f233853acfbb8abd2bcc085797d5933e43) --- libc-test/semver/solarish.txt | 1 + src/unix/solarish/mod.rs | 1 + 2 files changed, 2 insertions(+) create mode 100644 libc-test/semver/solarish.txt diff --git a/libc-test/semver/solarish.txt b/libc-test/semver/solarish.txt new file mode 100644 index 0000000000000..069508925c8ef --- /dev/null +++ b/libc-test/semver/solarish.txt @@ -0,0 +1 @@ +PIPE_BUF diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index 7ed00413dc7f2..d8ffc8e4411c4 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -1279,6 +1279,7 @@ pub const FOPEN_MAX: ::c_uint = 20; pub const FILENAME_MAX: ::c_uint = 1024; pub const L_tmpnam: ::c_uint = 25; pub const TMP_MAX: ::c_uint = 17576; +pub const PIPE_BUF: ::c_int = 5120; pub const GRND_NONBLOCK: ::c_uint = 0x0001; pub const GRND_RANDOM: ::c_uint = 0x0002; From 31b2b2ef90125f8f7ba77fdc691c78bb39d34c50 Mon Sep 17 00:00:00 2001 From: Kai Luo Date: Tue, 2 Apr 2024 04:40:34 -0400 Subject: [PATCH 2/5] Fix configuration for AIX (backport ) (cherry picked from commit 18dca23a4cf4884114e30b0b658f23f1f9eacaaa) --- src/unix/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 49984d3f00c65..26a4029d94f87 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -396,7 +396,7 @@ cfg_if! { #[cfg_attr(feature = "rustc-dep-of-std", link(name = "c", cfg(not(target_feature = "crt-static"))))] extern {} - } else if #[cfg(target_env = "aix")] { + } else if #[cfg(target_os = "aix")] { #[link(name = "c")] #[link(name = "m")] #[link(name = "bsd")] From 0f3edec1fd76fb577c3be0301789de493461ce6e Mon Sep 17 00:00:00 2001 From: virchau13 Date: Fri, 10 May 2024 10:18:52 +0800 Subject: [PATCH 3/5] feat(android): add RTLD_NODELETE RTLD_NODELETE has been supported on Android [since 2014](https://android-review.googlesource.com/c/platform/bionic/+/95170). (backport ) (cherry picked from commit 1049e5d42a2aab7b5004fbe593ff5e391342203a) --- libc-test/semver/android.txt | 1 + src/unix/linux_like/android/mod.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/libc-test/semver/android.txt b/libc-test/semver/android.txt index 9722b6e361f30..0bf7f422a2f49 100644 --- a/libc-test/semver/android.txt +++ b/libc-test/semver/android.txt @@ -2033,6 +2033,7 @@ RTLD_LAZY RTLD_LOCAL RTLD_NOLOAD RTLD_NOW +RTLD_NODELETE TCA_UNSPEC TCA_KIND TCA_OPTIONS diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index c2e7ddf2fc8be..535e874080633 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -1761,6 +1761,7 @@ pub const ST_NODIRATIME: ::c_ulong = 2048; pub const ST_RELATIME: ::c_ulong = 4096; pub const RTLD_NOLOAD: ::c_int = 0x4; +pub const RTLD_NODELETE: ::c_int = 0x1000; pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t; From 36407f301e4fe2aaf07fbb2f274112c6b68d05a9 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 12 May 2024 15:47:06 +0000 Subject: [PATCH 4/5] adding pthread_sigqueue to haiku. (backport ) (cherry picked from commit cbaa0d8e89c7b83446f3109b9b66d8c9ec267ee6) --- src/unix/haiku/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/unix/haiku/mod.rs b/src/unix/haiku/mod.rs index 0e60a1c6e267b..4dc931cd047d9 100644 --- a/src/unix/haiku/mod.rs +++ b/src/unix/haiku/mod.rs @@ -1791,6 +1791,7 @@ extern "C" { lock: *mut pthread_mutex_t, abstime: *const ::timespec, ) -> ::c_int; + pub fn pthread_sigqueue(thread: ::pthread_t, sig: ::c_int, value: ::sigval) -> ::c_int; pub fn pthread_spin_init(lock: *mut ::pthread_spinlock_t, pshared: ::c_int) -> ::c_int; pub fn pthread_spin_destroy(lock: *mut ::pthread_spinlock_t) -> ::c_int; pub fn pthread_spin_lock(lock: *mut ::pthread_spinlock_t) -> ::c_int; From a9cc8724fe8b8583d4691ba7298b406fedd1c246 Mon Sep 17 00:00:00 2001 From: Ola x Nilsson Date: Wed, 28 Feb 2024 14:07:47 +0100 Subject: [PATCH 5/5] Don't import std::string::String .../std/src/prelude/mod.rs:105:13 | = note: the item `String` is already defined here | = note: `#[warn(unused_imports)]` on by default (backport ) (cherry picked from commit 6025890b574c08aa052b37f39107f9a06ea1cb3a) --- build.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/build.rs b/build.rs index ee0d86edecb81..5945799d2423d 100644 --- a/build.rs +++ b/build.rs @@ -1,7 +1,6 @@ use std::env; use std::process::Command; use std::str; -use std::string::String; // List of cfgs this build script is allowed to set. The list is needed to support check-cfg, as we // need to know all the possible cfgs that this script will set. If you need to set another cfg