Skip to content

Commit 00f1d08

Browse files
committed
[android] Support building _CFPosixSpawnFileActionsChdir() for older Android APIs too
1 parent 59a8004 commit 00f1d08

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Sources/CoreFoundation/CFPlatform.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -2317,12 +2317,14 @@ CF_EXPORT int _CFPosixSpawnFileActionsChdir(_CFPosixSpawnFileActionsRef file_act
23172317
// Glibc versions prior to 2.29 don't support posix_spawn_file_actions_addchdir_np, impacting:
23182318
// - Amazon Linux 2 (EoL mid-2025)
23192319
return ENOSYS;
2320-
#elif defined(__OpenBSD__) || defined(__QNX__)
2320+
#elif defined(__OpenBSD__) || defined(__QNX__) || (defined(__ANDROID__) && __ANDROID_API__ < 34)
2321+
return ENOSYS;
23212322
// Currently missing as of:
23222323
// - OpenBSD 7.5 (April 2024)
23232324
// - QNX 8 (December 2023)
2325+
// - Android 13
23242326
return ENOSYS;
2325-
#elif defined(__GLIBC__) || TARGET_OS_DARWIN || defined(__FreeBSD__) || (defined(__ANDROID__) && __ANDROID_API__ >= 34) || defined(__musl__)
2327+
#elif defined(__GLIBC__) || TARGET_OS_DARWIN || defined(__FreeBSD__) || defined(__ANDROID__) || defined(__musl__)
23262328
// Pre-standard posix_spawn_file_actions_addchdir_np version available in:
23272329
// - Solaris 11.3 (October 2015)
23282330
// - Glibc 2.29 (February 2019)

0 commit comments

Comments
 (0)