Skip to content

Commit

Permalink
Fix definition of FNM_CASEFOLD for Illumos/Solaris
Browse files Browse the repository at this point in the history
Illumos reference (originally included in Solaris):
https://github.com/illumos/illumos-gate/blob/aaceae985c2e78cadef76bf0b7b50ed887ccb3a6/usr/src/head/fnmatch.h#L41

(backport <#4004>)
(cherry picked from commit 98a20b3)
  • Loading branch information
psumbera authored and tgross35 committed Nov 7, 2024
1 parent cd44558 commit 61150a4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,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 = 1 << 3;
} else {
pub const FNM_CASEFOLD: c_int = 1 << 4;
}
}

cfg_if! {
if #[cfg(any(
target_os = "macos",
Expand Down

0 comments on commit 61150a4

Please sign in to comment.