From 2f5083278f0819995e0332cdd5f4b2107e57b6dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20M=2E=20Bezerra?= Date: Sun, 3 Oct 2021 00:20:12 -0300 Subject: [PATCH] Add libc dependency Cross compatible (with windows) exit failure code --- Cargo.lock | 5 +++-- Cargo.toml | 1 + src/lib.rs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 25a148f..8ef9c38 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -112,9 +112,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.98" +version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790" +checksum = "dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6" [[package]] name = "libz-sys" @@ -155,6 +155,7 @@ dependencies = [ "bzip2", "flate2", "lazy_static", + "libc", "rand", "strsim", "tar", diff --git a/Cargo.toml b/Cargo.toml index d11f806..5eddf3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ lazy_static = "1.4.0" walkdir = "2.3.2" strsim = "0.10.0" bzip2 = "0.4.3" +libc = "0.2.103" tar = "0.4.37" xz2 = "0.1.6" zip = { version = "0.5.13", default-features = false, features = ["deflate-miniz"] } diff --git a/src/lib.rs b/src/lib.rs index 9b8a109..67db5e9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,7 +21,7 @@ pub use error::{Error, Result}; use lazy_static::lazy_static; -pub const EXIT_FAILURE: i32 = 127; +pub const EXIT_FAILURE: i32 = libc::EXIT_FAILURE; const VERSION: &str = "0.1.6";