From 2bddfa3fc6ebc7a5a0378e7dc7876cf88dc6f358 Mon Sep 17 00:00:00 2001 From: ur4t <46435411+ur4t@users.noreply.github.com> Date: Tue, 4 Jun 2024 22:49:00 +0800 Subject: [PATCH] update libc dependency --- Cargo.toml | 2 +- c-gull/Cargo.toml | 2 +- c-scape/Cargo.toml | 4 ++-- c-scape/src/process_.rs | 5 +---- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e7b3b81..627729e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ publish = false [dev-dependencies] assert_cmd = "2.0.12" -libc = "0.2.147" +libc = "0.2.155" [workspace] members = [ diff --git a/c-gull/Cargo.toml b/c-gull/Cargo.toml index b3e02ef..50536b6 100644 --- a/c-gull/Cargo.toml +++ b/c-gull/Cargo.toml @@ -14,7 +14,7 @@ keywords = ["linux", "libc"] [dependencies] # We use the libc crate for C ABI types and constants, but we don't depend on # the actual platform libc. -libc = { version = "0.2.138", default-features = false } +libc = { version = "0.2.155", default-features = false } c-scape = { path = "../c-scape", version = "0.16.1", default-features = false } errno = { version = "0.3.3", default-features = false, optional = true } tz-rs = { version = "0.6.11", default-features = false, optional = true } diff --git a/c-scape/Cargo.toml b/c-scape/Cargo.toml index 1938c03..c7d29ae 100644 --- a/c-scape/Cargo.toml +++ b/c-scape/Cargo.toml @@ -26,7 +26,7 @@ realpath-ext = { version = "0.1.0", default-features = false } origin = { version = "0.18.4", default-features = false, features = ["thread", "init-fini-arrays", "alloc"] } # We use the libc crate for C ABI types and constants, but we don't depend on # the actual platform libc. -libc = { version = "0.2.138", default-features = false } +libc = { version = "0.2.155", default-features = false } errno = { version = "0.3.3", default-features = false } rand_pcg = "0.3.1" rand_core = { version = "0.6.4", features = ["getrandom"] } @@ -59,7 +59,7 @@ features = [ ] [dev-dependencies] -libc = "0.2.138" +libc = "0.2.155" static_assertions = "1.1.0" [features] diff --git a/c-scape/src/process_.rs b/c-scape/src/process_.rs index e720879..7158b08 100644 --- a/c-scape/src/process_.rs +++ b/c-scape/src/process_.rs @@ -187,13 +187,10 @@ unsafe extern "C" fn __getauxval(type_: c_ulong) -> *mut c_void { #[cfg(feature = "take-charge")] fn _getauxval(type_: c_ulong) -> *mut c_void { - // FIXME: reuse const from libc when available? - const AT_MINSIGSTKSZ: libc::c_ulong = 51; - match type_ { libc::AT_HWCAP => ptr::without_provenance_mut(rustix::param::linux_hwcap().0), libc::AT_HWCAP2 => ptr::without_provenance_mut(rustix::param::linux_hwcap().1), - AT_MINSIGSTKSZ => ptr::without_provenance_mut(rustix::param::linux_minsigstksz()), + libc::AT_MINSIGSTKSZ => ptr::without_provenance_mut(rustix::param::linux_minsigstksz()), _ => todo!("unrecognized __getauxval {}", type_), } }