diff --git a/Cargo.toml b/Cargo.toml index fe13014..f898128 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ include = ["src", "Cargo.toml", "COPYRIGHT", "LICENSE*", "/*.md"] rust-version = "1.84" [dependencies] -linux-raw-sys = { version = "0.9.2", default-features = false, features = ["general", "no_std", "elf"] } +linux-raw-sys = { version = "0.9.2", default-features = false, optional = true, features = ["general", "no_std", "elf"] } rustix = { version = "1.0.0", default-features = false } bitflags = { version = "2.4.0", default-features = false } log = { version = "0.4.14", default-features = false, optional = true } @@ -79,7 +79,7 @@ optimize_for_size = [] # # To use threads, it is also necessary to enable the "thread" feature. # To use signals, it is also necessary to enable the "signal" feature. -take-charge = ["rustix/use-explicitly-provided-auxv", "rustix/runtime"] +take-charge = ["linux-raw-sys", "rustix/use-explicitly-provided-auxv", "rustix/runtime"] # Enable "take-charge" mode using origin's `_start` definition. origin-start = ["take-charge"] diff --git a/src/program/libc.rs b/src/program/libc.rs index a391034..517a791 100644 --- a/src/program/libc.rs +++ b/src/program/libc.rs @@ -32,7 +32,7 @@ use alloc::boxed::Box; #[cfg(feature = "program-at-exit")] use core::ptr::null_mut; -use linux_raw_sys::ctypes::c_int; +use libc::c_int; /// Register a function to be called when [`exit`] is called. #[cfg(feature = "program-at-exit")]