diff --git a/Source/JavaScriptCore/heap/MachineStackMarker.cpp b/Source/JavaScriptCore/heap/MachineStackMarker.cpp index 883914fd3d1ae..fcd3e57261b75 100644 --- a/Source/JavaScriptCore/heap/MachineStackMarker.cpp +++ b/Source/JavaScriptCore/heap/MachineStackMarker.cpp @@ -665,9 +665,8 @@ void* MachineThreads::Thread::Registers::framePointer() const #error Unknown Architecture #endif -#elif defined(__GLIBC__) +#elif OS(LINUX) -// The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) return reinterpret_cast((uintptr_t) regs.machineContext.gregs[REG_EBP]); #elif CPU(X86_64) @@ -747,9 +746,8 @@ void* MachineThreads::Thread::Registers::instructionPointer() const #error Unknown Architecture #endif -#elif defined(__GLIBC__) +#elif OS(LINUX) -// The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) return reinterpret_cast((uintptr_t) regs.machineContext.gregs[REG_EIP]); #elif CPU(X86_64) @@ -838,9 +836,8 @@ void* MachineThreads::Thread::Registers::llintPC() const #error Unknown Architecture #endif -#elif defined(__GLIBC__) +#elif OS(LINUX) -// The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) return reinterpret_cast((uintptr_t) regs.machineContext.gregs[REG_ESI]); #elif CPU(X86_64) diff --git a/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp b/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp index fd7f869d4b789..31fc11ad0b915 100644 --- a/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp +++ b/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp @@ -49,7 +49,7 @@ #include #include -#if OS(DARWIN) || (OS(LINUX) && !PLATFORM(GTK)) +#if OS(DARWIN) || (OS(LINUX) && !PLATFORM(GTK) && defined(__GLIBC__) && !defined(__UCLIBC__)) #include #include #endif @@ -187,7 +187,7 @@ void JSGlobalObjectInspectorController::pause() void JSGlobalObjectInspectorController::appendAPIBacktrace(ScriptCallStack* callStack) { -#if OS(DARWIN) || (OS(LINUX) && !PLATFORM(GTK)) +#if OS(DARWIN) || (OS(LINUX) && !PLATFORM(GTK) && defined(__GLIBC__) && !defined(__UCLIBC__)) static const int framesToShow = 31; static const int framesToSkip = 3; // WTFGetBacktrace, appendAPIBacktrace, reportAPIException.