Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ cc = "1.0.73"
[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
libc = "0.2.101"

[target.'cfg(any(target_os = "ios", target_os = "macos", target_os = "tvos", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", target_os = "dragonfly"))'.dependencies]
[target.'cfg(any(target_os = "ios", target_os = "macos", target_os = "tvos", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", target_os = "dragonfly", target_os = "illumos"))'.dependencies]
libc = "0.2.101"

[target.'cfg(target_os = "windows")'.dependencies]
Expand Down
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ fn main() {
const TARGET_OPENBSD: &str = "openbsd";
const TARGET_NETBSD: &str = "netbsd";
const TARGET_DRAGONFLY: &str = "dragonfly";
const TARGET_ILLUMOS: &str = "illumos";

// check cross-compile target. Only build lladdr.o when actually targeting UNIX.
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
Expand All @@ -21,6 +22,7 @@ fn main() {
TARGET_OPENBSD,
TARGET_NETBSD,
TARGET_DRAGONFLY,
TARGET_ILLUMOS,
]
.contains(&target_os.as_str())
{
Expand Down
6 changes: 4 additions & 2 deletions src/target/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ pub use linux::*;
target_os = "freebsd",
target_os = "openbsd",
target_os = "netbsd",
target_os = "dragonfly"
target_os = "dragonfly",
target_os = "illumos",
))]
mod unix;

Expand All @@ -24,7 +25,8 @@ mod unix;
target_os = "freebsd",
target_os = "openbsd",
target_os = "netbsd",
target_os = "dragonfly"
target_os = "dragonfly",
target_os = "illumos",
))]
pub use unix::*;

Expand Down
3 changes: 2 additions & 1 deletion src/target/unix/ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use libc::ifaddrs;
target_os = "freebsd",
target_os = "openbsd",
target_os = "netbsd",
target_os = "dragonfly"
target_os = "dragonfly",
target_os = "illumos",
))]
extern "C" {
pub fn lladdr(ptr: *mut ifaddrs) -> *const u8;
Expand Down
6 changes: 4 additions & 2 deletions src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ pub mod hex;
target_os = "freebsd",
target_os = "openbsd",
target_os = "netbsd",
target_os = "dragonfly"
target_os = "dragonfly",
target_os = "illumos",
))]
mod unix;

Expand All @@ -26,6 +27,7 @@ pub(crate) mod ffialloc;
target_os = "freebsd",
target_os = "openbsd",
target_os = "netbsd",
target_os = "dragonfly"
target_os = "dragonfly",
target_os = "illumos",
))]
pub use unix::*;
Loading