Skip to content

Commit 321997f

Browse files
committed
[CoreFoundation] Musl doesn't have _D_EXACT_NAMLEN or d_namlen.
This means we're in the same boat as for Android - we need to use `strlen`. rdar://123381867
1 parent fbc7e2c commit 321997f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ CF_CROSS_PLATFORM_EXPORT int _CFOpenFile(const char *path, int opts);
563563
static inline int _direntNameLength(struct dirent *entry) {
564564
#ifdef _D_EXACT_NAMLEN // defined on Linux
565565
return _D_EXACT_NAMLEN(entry);
566-
#elif TARGET_OS_ANDROID
566+
#elif TARGET_OS_LINUX || TARGET_OS_ANDROID
567567
return strlen(entry->d_name);
568568
#else
569569
return entry->d_namlen;

0 commit comments

Comments
 (0)