Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From 415e31bd5444fa360af58b069f1b9db6607fca7d Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Fri, 6 Oct 2017 17:00:08 +0300 |
| 4 | Subject: [PATCH] Fix build with musl |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
| 8 | --- |
| 9 | Source/JavaScriptCore/runtime/MachineContext.h | 10 +++++----- |
| 10 | Source/WTF/wtf/Platform.h | 2 +- |
| 11 | 2 files changed, 6 insertions(+), 6 deletions(-) |
| 12 | |
| 13 | diff --git a/Source/JavaScriptCore/runtime/MachineContext.h b/Source/JavaScriptCore/runtime/MachineContext.h |
| 14 | index 95080b9..2bb689c 100644 |
| 15 | --- a/Source/JavaScriptCore/runtime/MachineContext.h |
| 16 | +++ b/Source/JavaScriptCore/runtime/MachineContext.h |
| 17 | @@ -146,7 +146,7 @@ inline void*& stackPointer(mcontext_t& machineContext) |
| 18 | #error Unknown Architecture |
| 19 | #endif |
| 20 | |
| 21 | -#elif defined(__GLIBC__) |
| 22 | +#elif defined(__linux__) |
| 23 | |
| 24 | #if CPU(X86) |
| 25 | return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_ESP]); |
| 26 | @@ -251,7 +251,7 @@ inline void*& framePointer(mcontext_t& machineContext) |
| 27 | #error Unknown Architecture |
| 28 | #endif |
| 29 | |
| 30 | -#elif defined(__GLIBC__) |
| 31 | +#elif defined(__linux__) |
| 32 | |
| 33 | // The following sequence depends on glibc's sys/ucontext.h. |
| 34 | #if CPU(X86) |
| 35 | @@ -354,7 +354,7 @@ inline void*& instructionPointer(mcontext_t& machineContext) |
| 36 | #error Unknown Architecture |
| 37 | #endif |
| 38 | |
| 39 | -#elif defined(__GLIBC__) |
| 40 | +#elif defined(__linux__) |
| 41 | |
| 42 | // The following sequence depends on glibc's sys/ucontext.h. |
| 43 | #if CPU(X86) |
| 44 | @@ -466,7 +466,7 @@ inline void*& argumentPointer<1>(mcontext_t& machineContext) |
| 45 | #error Unknown Architecture |
| 46 | #endif |
| 47 | |
| 48 | -#elif defined(__GLIBC__) |
| 49 | +#elif defined(__linux__) |
| 50 | |
| 51 | // The following sequence depends on glibc's sys/ucontext.h. |
| 52 | #if CPU(X86) |
| 53 | @@ -583,7 +583,7 @@ inline void*& llintInstructionPointer(mcontext_t& machineContext) |
| 54 | #error Unknown Architecture |
| 55 | #endif |
| 56 | |
| 57 | -#elif defined(__GLIBC__) |
| 58 | +#elif defined(__linux__) |
| 59 | |
| 60 | // The following sequence depends on glibc's sys/ucontext.h. |
| 61 | #if CPU(X86) |
| 62 | diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h |
| 63 | index 5a2863b..b36c3ff 100644 |
| 64 | --- a/Source/WTF/wtf/Platform.h |
| 65 | +++ b/Source/WTF/wtf/Platform.h |
| 66 | @@ -680,7 +680,7 @@ |
| 67 | #define HAVE_CFNETWORK_STORAGE_PARTITIONING 1 |
| 68 | #endif |
| 69 | |
| 70 | -#if OS(DARWIN) || ((OS(FREEBSD) || defined(__GLIBC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS))) |
| 71 | +#if OS(DARWIN) || ((OS(FREEBSD) || defined(__linux__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS))) |
| 72 | #define HAVE_MACHINE_CONTEXT 1 |
| 73 | #endif |
| 74 | |
| 75 | -- |
| 76 | 2.14.1 |
| 77 | |