From cff92972361b6a6b21018afde99bb5be3d77b3d6 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 22 Dec 2015 16:58:21 +0900 Subject: [PATCH] Bug 1113930 - Move __libc_stack_end related code block from StackWalk.cpp in a non-OSX section. r=froydnj Bug 989499 unfortunately moved it to a OSX-only section, which broke using __libc_stack_end, which is Linux-specific (glibc, really). --- mozglue/misc/StackWalk.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp index 2f607345422..aa752c424b8 100644 --- a/mozglue/misc/StackWalk.cpp +++ b/mozglue/misc/StackWalk.cpp @@ -47,13 +47,6 @@ static CriticalAddress gCriticalAddress; ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \ defined(HAVE__UNWIND_BACKTRACE))) -#if MOZ_STACKWALK_SUPPORTS_MACOSX -#include -#include -#ifdef MOZ_WIDGET_COCOA -#include -#endif - #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) #define HAVE___LIBC_STACK_END 1 #else @@ -64,6 +57,13 @@ static CriticalAddress gCriticalAddress; extern MOZ_EXPORT void* __libc_stack_end; // from ld-linux.so #endif +#if MOZ_STACKWALK_SUPPORTS_MACOSX +#include +#include +#ifdef MOZ_WIDGET_COCOA +#include +#endif + typedef void malloc_logger_t(uint32_t aType, uintptr_t aArg1, uintptr_t aArg2, uintptr_t aArg3,