Skip to content

Commit

Permalink
added target os cfgs to all modules in lib.rs
Browse files Browse the repository at this point in the history
changes compilation on non-MacOS systems from a compile error to a no-op
  • Loading branch information
nate-fe2o3 committed Jan 16, 2025
1 parent b6d4a67 commit 9af0ccf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions system-configuration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@
//!
//! [SystemConfiguration]: https://developer.apple.com/documentation/systemconfiguration?language=objc
//! [`system-configuration-sys`]: https://crates.io/crates/system-configuration-sys
#![deny(missing_docs)]

/// CoreFoundation wrappers
#[macro_use]
#[cfg(target_os = "macos")]
pub extern crate core_foundation;
/// Low-level SystemConfiguration bindings
#[cfg(target_os = "macos")]
pub extern crate system_configuration_sys as sys;

#[cfg(target_os = "macos")]
pub mod dynamic_store;
#[cfg(target_os = "macos")]
pub mod network_configuration;
#[cfg(target_os = "macos")]
pub mod network_reachability;
#[cfg(target_os = "macos")]
pub mod preferences;

0 comments on commit 9af0ccf

Please sign in to comment.