Skip to content

Commit 0129358

Browse files
authored
Fix OpenBSD clause. (#5160)
OpenBSD, as the comment string in _CFPosixSpawnFileActionsChdir says, doesn't have posix_spawn_file_actions_addchdir. Therefore, don't link against it; just return ENOSYS like other similarly situated platforms do.
1 parent c466923 commit 0129358

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
@@ -2287,6 +2287,10 @@ CF_EXPORT int _CFPosixSpawnFileActionsChdir(_CFPosixSpawnFileActionsRef file_act
22872287
// Glibc versions prior to 2.29 don't support posix_spawn_file_actions_addchdir_np, impacting:
22882288
// - Amazon Linux 2 (EoL mid-2025)
22892289
return ENOSYS;
2290+
#elif defined(__OpenBSD__)
2291+
// Currently missing as of:
2292+
// - OpenBSD 7.5 (April 2024)
2293+
return ENOSYS;
22902294
#elif defined(__GLIBC__) || TARGET_OS_DARWIN || defined(__FreeBSD__) || (defined(__ANDROID__) && __ANDROID_API__ >= 34) || defined(__musl__)
22912295
// Pre-standard posix_spawn_file_actions_addchdir_np version available in:
22922296
// - Solaris 11.3 (October 2015)
@@ -2300,8 +2304,6 @@ CF_EXPORT int _CFPosixSpawnFileActionsChdir(_CFPosixSpawnFileActionsRef file_act
23002304
// Standardized posix_spawn_file_actions_addchdir version (POSIX.1-2024, June 2024) available in:
23012305
// - Solaris 11.4 (August 2018)
23022306
// - NetBSD 10.0 (March 2024)
2303-
// Currently missing as of:
2304-
// - OpenBSD 7.5 (April 2024)
23052307
// - QNX 8 (December 2023)
23062308
return posix_spawn_file_actions_addchdir((posix_spawn_file_actions_t *)file_actions, path);
23072309
#endif

0 commit comments

Comments
 (0)