summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2021-11-30 14:40:23 +0100
committerRobert Griebl <robert.griebl@qt.io>2021-12-01 21:20:10 +0000
commit812c46800d83e922b9e80ccde4aab7363f35e1b5 (patch)
tree34f3e5c17d7253a3dc52e13fcbe5562769bc1cfc
parent9b0f48bcdd5e3dc9d07973ef2a44818ba35c4224 (diff)
downloadqtapplicationmanager-812c46800d83e922b9e80ccde4aab7363f35e1b5.tar.gz
Fix glibc compatibility problem
glibc 2.32 deprecated sys_siglist: the symbol is not available to link against anymore, but it is available at runtime for apps that have been linked against an older glibc version. Our problem is now that the CI builds release version of the AM against an older glibc, which works for the appman binary itself, but if you want to compile a custom appman executable on a modern, glibc 2.32 based system, you get a "missing symbol" linker error in libQt6AppManCommon.a(unixsignalhandler.cpp.o) Detecting this at runtime would be a nightmare for little gain, so we fall back to using the non-async-signal-safe strsignal() function when initially building against a glibc < 2.32. Change-Id: I1e702c5ee00e2725fe6f76f9ce001c099ec72eea Fixes: AUTOSUITE-1667 Reviewed-by: Dominik Holland <dominik.holland@qt.io> (cherry picked from commit 65ddbe72001cc9e5a49b54d821eafd352c25ee92) Reviewed-by: Robert Griebl <robert.griebl@qt.io>
-rw-r--r--src/common-lib/unixsignalhandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common-lib/unixsignalhandler.cpp b/src/common-lib/unixsignalhandler.cpp
index 3878dddf..8777cd4e 100644
--- a/src/common-lib/unixsignalhandler.cpp
+++ b/src/common-lib/unixsignalhandler.cpp
@@ -92,7 +92,7 @@ const char *UnixSignalHandler::signalName(int sig)
#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 32
return sigdescr_np(sig);
#else
- return sys_siglist[sig];
+ return strsignal(sig); // not async-signal-safe
#endif
#else
Q_UNUSED(sig)