diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-10-12 14:42:05 +0200 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2022-01-07 19:27:33 +0100 |
commit | 2518c7e9bb7cb25196d66f4c0c8695a6585a1b49 (patch) | |
tree | 31b12daa0fdb77362a2ccc908798514d00735761 | |
parent | 5a0dab064150571ee30a5c32f45976d4130a42ec (diff) |
external/breakpad: Adpat to SIGSTKSZ type in glibc 2.34
<https://sourceware.org/git/?p=glibc.git;a=commit;h=6c57d320484988e87e446e2e60ce42816bf51d53>
"sysconf: Add _SC_MINSIGSTKSZ/_SC_SIGSTKSZ [BZ #20305]" introduced
sysdeps/unix/sysv/linux/bits/sigstksz.h containing
> # define SIGSTKSZ sysconf (_SC_SIGSTKSZ)
so that SIGSTKSZ would have type long, causing
> src/client/linux/handler/exception_handler.cc: In function ‘void google_breakpad::{anonymous}::InstallAlternateStackLocked()’:
> src/client/linux/handler/exception_handler.cc:141:49: error: no matching function for call to ‘max(int, long int)’
> 141 | static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
> | ~~~~~~~~^~~~~~~~~~~~~~~~~
when building ExternalProject_breakpad. At least SuS4 appears to be silent
about a required type of SIGSTKSZ defined in signal.h.
Change-Id: I4d87017e10825ef051721f4e9ca751a77bb0d5c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123455
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | external/breakpad/SIGSTKSZ.patch | 11 | ||||
-rw-r--r-- | external/breakpad/UnpackedTarball_breakpad.mk | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/external/breakpad/SIGSTKSZ.patch b/external/breakpad/SIGSTKSZ.patch new file mode 100644 index 000000000000..d37c58a2f84b --- /dev/null +++ b/external/breakpad/SIGSTKSZ.patch @@ -0,0 +1,11 @@ +--- src/client/linux/handler/exception_handler.cc ++++ src/client/linux/handler/exception_handler.cc +@@ -138,7 +138,7 @@ + // SIGSTKSZ may be too small to prevent the signal handlers from overrunning + // the alternative stack. Ensure that the size of the alternative stack is + // large enough. +- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); ++ static const unsigned kSigStackSize = std::max<decltype(SIGSTKSZ)>(16384, SIGSTKSZ); + + // Only set an alternative stack if there isn't already one, or if the current + // one is too small. diff --git a/external/breakpad/UnpackedTarball_breakpad.mk b/external/breakpad/UnpackedTarball_breakpad.mk index b9e14874d72d..af6f68053328 100644 --- a/external/breakpad/UnpackedTarball_breakpad.mk +++ b/external/breakpad/UnpackedTarball_breakpad.mk @@ -25,6 +25,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\ external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1 \ external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1 \ external/breakpad/c++20-allocator.patch \ + external/breakpad/SIGSTKSZ.patch \ )) ifeq ($(COM_IS_CLANG),TRUE) |