QElfParser: use ELFOSABI_LINUX instead of ELFOSABI_GNU

It seems to be the preferred constant in other OSes. In particular,
OpenBSD does not appear to have ELFOSABI_GNU[1]. Found while researching
if commit 9caac0f176 was still necessary
for OpenBSD.

This reverts commit ded2fd9ff4, which
implied NetBSD 9 doesn't have ELFOSABI_GNU either.

[1] https://github.com/openbsd/ports/blob/master/x11/qt6/qtbase/patches/patch-src_corelib_plugin_qelfparser_p_cpp

Pick-to: 6.5 6.6
Change-Id: I63b988479db546dabffcfffd17662020d722af20
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
Thiago Macieira 2023-06-06 09:53:55 -07:00
parent b1816c2718
commit 4e2f8bad0a

View File

@ -20,11 +20,6 @@
# 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;
@ -340,7 +335,7 @@ Q_DECL_UNUSED Q_DECL_COLD_FUNCTION static QDebug &operator<<(QDebug &d, ElfHeade
case ELFOSABI_SYSV: d << " (SYSV"; break;
case ELFOSABI_HPUX: d << " (HP-UX"; break;
case ELFOSABI_NETBSD: d << " (NetBSD"; break;
case ELFOSABI_GNU: d << " (GNU/Linux"; break;
case ELFOSABI_LINUX: d << " (GNU/Linux"; break;
case ELFOSABI_SOLARIS: d << " (Solaris"; break;
case ELFOSABI_AIX: d << " (AIX"; break;
case ELFOSABI_IRIX: d << " (IRIX"; break;