Skip to content

Commit 78134c7

Browse files
committed
Fix ifdefs to properly guard process spawning code on iOS platforms
1 parent 1793f59 commit 78134c7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/Basic/Subprocess.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#define __GLIBC_PREREQ(maj, min) 0
5656
#endif
5757

58-
#ifndef _WIN32
58+
#if !defined(_WIN32) && defined(HAVE_POSIX_SPAWN)
5959
/// MARK: BEGIN: DUPLICATED FROM swiftlang/swift-subprocess
6060
#define _subprocess_precondition(__cond) do { \
6161
int eval = (__cond); \
@@ -341,9 +341,7 @@ _exit(EXIT_FAILURE)
341341
}
342342
}
343343
/// MARK: END: DUPLICATED FROM swiftlang/swift-subprocess
344-
#endif
345344

346-
#if !defined(_WIN32) && defined(HAVE_POSIX_SPAWN)
347345
static bool posix_spawn_file_actions_addchdir_supported() {
348346
#if (defined(__GLIBC__) && !__GLIBC_PREREQ(2, 29)) || (defined(__OpenBSD__)) || (defined(__ANDROID__) && __ANDROID_API__ < 34) || (defined(__QNX__))
349347
return false;

0 commit comments

Comments
 (0)