diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-09-03 02:05:30 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-09-03 02:05:30 +0800 |
commit | f6c36037edc3f1293f96e84691136c657ca488dc (patch) | |
tree | 0249461b362e0899bdb07e7e37f41a53960b21a6 /src/base | |
parent | 948fef53cefe6a7186fab29d9ad2e9838d702912 (diff) | |
download | cru-f6c36037edc3f1293f96e84691136c657ca488dc.tar.gz cru-f6c36037edc3f1293f96e84691136c657ca488dc.tar.bz2 cru-f6c36037edc3f1293f96e84691136c657ca488dc.zip |
Fix subprocess OSX compile error.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/platform/unix/PosixSpawnSubProcess.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/base/platform/unix/PosixSpawnSubProcess.cpp b/src/base/platform/unix/PosixSpawnSubProcess.cpp index 25e6c38c..34ae6622 100644 --- a/src/base/platform/unix/PosixSpawnSubProcess.cpp +++ b/src/base/platform/unix/PosixSpawnSubProcess.cpp @@ -103,9 +103,9 @@ void PosixSpawnSubProcessImpl::PlatformCreateProcess( u"Failed to call posix_spawnattr_init."); Guard attr_guard([&attr] { posix_spawnattr_destroy(&attr); }); -#ifdef CRU_PLATFORM_OSX - error = posix_spawnattr_setflags(&attr, POSIX_SPAWN_CLOEXEC_DEFAULT); - check_error(u"Failed to set flag POSIX_SPAWN_CLOEXEC_DEFAULT (osx)."); +#ifdef __APPLE__ + check_error(posix_spawnattr_setflags(&attr, POSIX_SPAWN_CLOEXEC_DEFAULT), + u"Failed to set flag POSIX_SPAWN_CLOEXEC_DEFAULT (osx)."); #endif auto exe = start_info.program.ToUtf8(); |