Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
raviqqe committed Jul 14, 2024
1 parent 0c1c82f commit f77bacc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion sac/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme.workspace = true
repository.workspace = true

[features]
libc = ["stak-device/libc", "stak-file/libc"]
libc = ["dep:libc", "stak-device/libc", "stak-file/libc"]
std = [
"dep:clap",
"stak-device/std",
Expand All @@ -21,6 +21,7 @@ std = [

[dependencies]
clap = { version = "4.5.9", features = ["derive"], optional = true }
libc = { version = "0.2.155", optional = true }
main_error = "0.1.2"
stak-configuration = { version = "0.1.38", path = "../configuration" }
stak-device = { version = "0.2.42", path = "../device" }
Expand Down
5 changes: 4 additions & 1 deletion sac/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
pub mod __private {
#[cfg(feature = "std")]
pub use clap;
#[cfg(feature = "libc")]
pub use libc;
#[cfg(feature = "std")]
pub use main_error;
pub use stak_configuration;
Expand Down Expand Up @@ -86,6 +88,7 @@ macro_rules! libc_main {
};
($path:expr, $heap_size:expr) => {
use $crate::__private::{
libc::exit,
stak_device::libc::{ReadWriteDevice, Stderr, Stdin, Stdout},
stak_file::LibcFileSystem,
stak_macro::include_r7rs,
Expand All @@ -97,7 +100,7 @@ macro_rules! libc_main {
#[cfg(not(test))]
#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
unsafe { libc::exit(1) }
unsafe { exit(1) }
}

#[cfg_attr(not(test), no_mangle)]
Expand Down

0 comments on commit f77bacc

Please sign in to comment.