Skip to content

Commit 27b4ec4

Browse files
committed
Fix windows/mac compile issue
1 parent ec48ff6 commit 27b4ec4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

system/jlib/jdebug.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4430,6 +4430,7 @@ jlib_decl bool printLsOf(unsigned pid)
44304430
// Memory monitoring and core dump functionality
44314431
//---------------------------------------------------------------------------------------------------------------------
44324432

4433+
#ifdef __linux__
44334434
static void createCoreDumpProcessAndWait(bool useVforkAndGcore, pid_t pid)
44344435
{
44354436
char gCoreFname[64];
@@ -4478,7 +4479,6 @@ static void createCoreDumpProcessAndWait(bool useVforkAndGcore, pid_t pid)
44784479

44794480
void generateCoreDump(bool useVforkAndGcore, bool suspendParent)
44804481
{
4481-
#ifdef __linux__
44824482
pid_t parentPid = getpid();
44834483

44844484
if (suspendParent)
@@ -4531,10 +4531,13 @@ void generateCoreDump(bool useVforkAndGcore, bool suspendParent)
45314531
// however, the core child process's execution of abort() or gcore will suspend the process.
45324532
createCoreDumpProcessAndWait(useVforkAndGcore, parentPid);
45334533
}
4534+
}
45344535
#else
4536+
void generateCoreDump(bool useVforkAndGcore, bool suspendParent)
4537+
{
45354538
WARNLOG("generateCoreDump: Core dump generation not supported\n");
4536-
#endif
45374539
}
4540+
#endif
45384541

45394542
class CMemoryMonitor : public CSimpleInterfaceOf<IMemoryMonitor>, public IThreaded
45404543
{

0 commit comments

Comments
 (0)