Skip to content

Commit

Permalink
QElfParser: use ELFOSABI_LINUX instead of ELFOSABI_GNU
Browse files Browse the repository at this point in the history
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 9caac0f was still necessary
for OpenBSD.

This reverts commit ded2fd9, 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 <[email protected]>
Reviewed-by: Allan Sandfeld Jensen <[email protected]>
  • Loading branch information
thiagomacieira committed Jun 8, 2023
1 parent b1816c2 commit 4e2f8ba
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/corelib/plugin/qelfparser_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4e2f8ba

Please sign in to comment.