Skip to content

Commit 0a3b786

Browse files
authored
Merge pull request rust-lang#4004 from psumbera/solaris-FNM_CASEFOLD
Fix definition of FNM_CASEFOLD for Illumos/Solaris
2 parents a8d7c4e + 98a20b3 commit 0a3b786

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)