Skip to content

Commit 62809e9

Browse files
authored
Merge pull request #2589 from 3405691582/CFFileUtilities_NoWhiteout
[CF] DT_WHT is unavailable on OpenBSD.
2 parents 2d7dfdd + f966078 commit 62809e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CoreFoundation/Base.subproj/CFFileUtilities.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,11 @@ CF_PRIVATE CFMutableArrayRef _CFCreateContentsOfDirectory(CFAllocatorRef alloc,
439439
dirURL = CFURLCreateFromFileSystemRepresentation(alloc, (uint8_t *)dirPath, pathLength, true);
440440
releaseBase = true;
441441
}
442+
#if !defined(__OpenBSD__)
442443
if (dp->d_type == DT_DIR || dp->d_type == DT_UNKNOWN || dp->d_type == DT_LNK || dp->d_type == DT_WHT) {
444+
#else
445+
if (dp->d_type == DT_DIR || dp->d_type == DT_UNKNOWN || dp->d_type == DT_LNK) {
446+
#endif
443447
Boolean isDir = (dp->d_type == DT_DIR);
444448
if (!isDir) {
445449
// Ugh; must stat.

0 commit comments

Comments
 (0)