diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 53ad59b1b160d..5929dde230958 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -321,9 +321,19 @@ pub const ATF_PUBL: ::c_int = 0x08; pub const ATF_USETRAILERS: ::c_int = 0x10; pub const FNM_PERIOD: c_int = 1 << 2; -pub const FNM_CASEFOLD: c_int = 1 << 4; pub const FNM_NOMATCH: c_int = 1; +cfg_if! { + if #[cfg(any( + target_os = "illumos", + target_os = "solaris", + ))] { + pub const FNM_CASEFOLD: c_int = 0x08; + } else { + pub const FNM_CASEFOLD: c_int = 1 << 4; + } +} + cfg_if! { if #[cfg(any( target_os = "macos",