Skip to content

Commit 98a20b3

Browse files
psumberatgross35
authored andcommitted
Fix definition of FNM_CASEFOLD for Illumos/Solaris
Illumos reference (originally included in Solaris): https://github.com/illumos/illumos-gate/blob/aaceae985c2e78cadef76bf0b7b50ed887ccb3a6/usr/src/head/fnmatch.h#L41
1 parent b32d59d commit 98a20b3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/unix/mod.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,19 @@ pub const ATF_PUBL: ::c_int = 0x08;
321321
pub const ATF_USETRAILERS: ::c_int = 0x10;
322322

323323
pub const FNM_PERIOD: c_int = 1 << 2;
324-
pub const FNM_CASEFOLD: c_int = 1 << 4;
325324
pub const FNM_NOMATCH: c_int = 1;
326325

326+
cfg_if! {
327+
if #[cfg(any(
328+
target_os = "illumos",
329+
target_os = "solaris",
330+
))] {
331+
pub const FNM_CASEFOLD: c_int = 1 << 3;
332+
} else {
333+
pub const FNM_CASEFOLD: c_int = 1 << 4;
334+
}
335+
}
336+
327337
cfg_if! {
328338
if #[cfg(any(
329339
target_os = "macos",

0 commit comments

Comments
 (0)