Skip to content

Commit

Permalink
Merge pull request wesleywiser#15 from ifurther/patch-1
Browse files Browse the repository at this point in the history
Add support android
  • Loading branch information
wesleywiser authored Oct 14, 2022
2 parents 3335e38 + b525b88 commit ff02832
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ keywords = ["current", "process", "executable", "dylib", "dll"]
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.9", features = ["errhandlingapi", "libloaderapi", "minwindef", "winerror" ] }

[target.'cfg(any(target_os="linux", target_os="freebsd", target_os="dragonfly", target_os="netbsd", target_os="macos", target_os="illumos"))'.dependencies]
[target.'cfg(any(target_os="linux", target_os="freebsd", target_os="dragonfly", target_os="netbsd", target_os="macos", target_os="illumos", target_os="android"))'.dependencies]
libc = "0.2.81"
8 changes: 5 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
//! * macOS
//! * Windows
//! * illumos
//! * Android
use std::path::PathBuf;

#[cfg(any(target_os = "linux", target_os = "illumos"))]
#[cfg(any(target_os = "linux", target_os = "illumos", target_os = "android"))]
mod linux;
#[cfg(any(target_os = "linux", target_os = "illumos"))]
#[cfg(any(target_os = "linux", target_os = "illumos", target_os = "android"))]
use linux as os;

#[cfg(target_os = "macos")]
Expand All @@ -44,7 +45,8 @@ use bsd as os;
target_os = "dragonfly",
target_os = "netbsd",
target_os = "macos",
target_os = "illumos"
target_os = "illumos",
target_os = "android"
))]
mod nix;

Expand Down

0 comments on commit ff02832

Please sign in to comment.