From ded2fd9ff4fea06af881229bacaeff5d0ecfa6de 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. Pick-to: 6.4 6.4.1 Change-Id: I3d18efe117ea21f13831df5293b4efce99694294 Reviewed-by: Thiago Macieira --- 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 32426c6092..4388c6babe 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;