From 0719388cfb1a79160204314beb1de1f9c29a3684 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Wed, 25 Nov 2020 20:15:32 +0000 Subject: [PATCH] raspberry build fix. (#8095) __ILP32__ is 32 bits ABI and does not imply x86, this patch resolves this. --- src/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debug.c b/src/debug.c index 87e81eadb..d32a8ddce 100644 --- a/src/debug.c +++ b/src/debug.c @@ -971,7 +971,7 @@ static void *getMcontextEip(ucontext_t *uc) { #endif #elif defined(__linux__) /* Linux */ - #if defined(__i386__) || defined(__ILP32__) + #if defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) return (void*) uc->uc_mcontext.gregs[14]; /* Linux 32 */ #elif defined(__X86_64__) || defined(__x86_64__) return (void*) uc->uc_mcontext.gregs[16]; /* Linux 64 */ @@ -1139,7 +1139,7 @@ void logRegisters(ucontext_t *uc) { /* Linux */ #elif defined(__linux__) /* Linux x86 */ - #if defined(__i386__) || defined(__ILP32__) + #if defined(__i386__) || ((defined(__X86_64__) || defined(__x86_64__)) && defined(__ILP32__)) serverLog(LL_WARNING, "\n" "EAX:%08lx EBX:%08lx ECX:%08lx EDX:%08lx\n"