# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/firefox/hotfix-disable-moz-stackwalk.patch.musl # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1882329 diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp index 2fefc5b..57c56e6 100644 --- a/mozglue/misc/StackWalk.cpp +++ b/mozglue/misc/StackWalk.cpp @@ -46,5 +46,12 @@ using namespace mozilla; +#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) +# define HAVE___LIBC_STACK_END 1 +#else +# define HAVE___LIBC_STACK_END 0 +#endif + #if (defined(linux) && \ ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \ - defined(HAVE__UNWIND_BACKTRACE))) + defined(HAVE__UNWIND_BACKTRACE)) && \ + (HAVE___LIBC_STACK_END || ANDROID)) # define MOZ_STACKWALK_SUPPORTS_LINUX 1 @@ -54,8 +61,2 @@ using namespace mozilla; -#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) -# define HAVE___LIBC_STACK_END 1 -#else -# define HAVE___LIBC_STACK_END 0 -#endif - #if HAVE___LIBC_STACK_END