From 17537273f067b5e14aef3debe246c75509814c33 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 6 Jun 2023 09:53:55 -0700 Subject: [PATCH] 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 9caac0f176040b4da48d3ea289683b0b082cf729 was still necessary for OpenBSD. This reverts commit ded2fd9ff4fea06af881229bacaeff5d0ecfa6de, 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 Change-Id: I63b988479db546dabffcfffd17662020d722af20 Reviewed-by: Lars Knoll Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 4e2f8bad0a4e83ac6890bf6f38f26d9857c0d79b) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/plugin/qelfparser_p.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp index a5a72cda187..ffc4a14be0a 100644 --- a/src/corelib/plugin/qelfparser_p.cpp +++ b/src/corelib/plugin/qelfparser_p.cpp @@ -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;