From 74f8266e338f69d1220433c8c92e9db19a1a91af Mon Sep 17 00:00:00 2001 From: Niclas Rosenvik Date: Thu, 3 Nov 2022 21:22:13 +0100 Subject: [PATCH] corelib: Support ELFOSABI_LINUX in qelfparser ELFOSABI_LINUX is the old name for ELFOSABI_GNU and some systems (NetBSD 9) with an old elf.h still use that define instead of ELFOSABI_GNU. Change-Id: I3d18efe117ea21f13831df5293b4efce99694294 Reviewed-by: Thiago Macieira (cherry picked from commit ded2fd9ff4fea06af881229bacaeff5d0ecfa6de) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/plugin/qelfparser_p.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp index 2890e553119..6ebfaff21e2 100644 --- a/src/corelib/plugin/qelfparser_p.cpp +++ b/src/corelib/plugin/qelfparser_p.cpp @@ -20,6 +20,11 @@ # error "Need ELF header to parse plugins." #endif +// Support older ELFOSABI define for GNU/Linux +#if !defined(ELFOSABI_GNU) && defined(ELFOSABI_LINUX) +# define ELFOSABI_GNU ELFOSABI_LINUX +#endif + QT_BEGIN_NAMESPACE using namespace Qt::StringLiterals;