Skip to content

Commit 74e6d3d

Browse files
authored
Merge pull request #2473 from Wc4ever/fix/emscripten-compilation
Fix WebAssembly build: feature-detect SYS_pidfd_open
2 parents b8b62c7 + 6d5acca commit 74e6d3d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

BeefySysLib/platform/posix/PosixCommon.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ BFP_EXPORT void BFP_CALLTYPE BfpProcess_Release(BfpProcess* process)
11241124

11251125
BFP_EXPORT bool BFP_CALLTYPE BfpProcess_WaitFor(BfpProcess* process, int waitMS, int* outExitCode, BfpProcessResult* outResult)
11261126
{
1127-
#ifdef BF_PLATFORM_LINUX
1127+
#if defined(BF_PLATFORM_LINUX) && defined(SYS_pidfd_open)
11281128
const int processFd = syscall(SYS_pidfd_open, process->mProcessId, 0);
11291129
if (processFd < 0)
11301130
{
@@ -1618,7 +1618,7 @@ bool BfpSpawn_WaitFor(BfpSpawn* spawn, int waitMS, int* outExitCode, BfpSpawnRes
16181618
return true;
16191619
}
16201620

1621-
#ifdef BF_PLATFORM_LINUX
1621+
#if defined(BF_PLATFORM_LINUX) && defined(SYS_pidfd_open)
16221622
const int childFd = (int)syscall(SYS_pidfd_open, spawn->mPid, 0);
16231623
if (childFd == -1)
16241624
{

0 commit comments

Comments
 (0)