Skip to content

Commit

Permalink
update libc dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ur4t committed Jun 4, 2024
1 parent 425e789 commit 2bddfa3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ publish = false

[dev-dependencies]
assert_cmd = "2.0.12"
libc = "0.2.147"
libc = "0.2.155"

[workspace]
members = [
Expand Down
2 changes: 1 addition & 1 deletion c-gull/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions c-scape/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down Expand Up @@ -59,7 +59,7 @@ features = [
]

[dev-dependencies]
libc = "0.2.138"
libc = "0.2.155"
static_assertions = "1.1.0"

[features]
Expand Down
5 changes: 1 addition & 4 deletions c-scape/src/process_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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_),
}
}
Expand Down

0 comments on commit 2bddfa3

Please sign in to comment.