1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use cfg_if::cfg_if;

cfg_if! {
    if #[cfg(any(target_os = "linux", target_os = "android"))] {
        mod linux;
        pub use self::linux::*;
    } else if #[cfg(target_os = "macos")] {
        mod macos;
        pub use self::macos::*;
    } else if #[cfg(any(target_os = "freebsd"))] {
        mod bsd;
        pub use self::bsd::*;
    } else {
        mod not_supported;
        pub use self::not_supported::*;
    }
}