diff options
author | Janne Juntunen <janne.juntunen@qt.io> | 2021-11-03 13:04:07 +0200 |
---|---|---|
committer | Janne Juntunen <janne.juntunen@qt.io> | 2021-11-30 14:37:52 +0200 |
commit | 2bfa4b9960f283396427828deac6f194893cc811 (patch) | |
tree | 20b0a98726e000cb8ff8a82da246eb985a6e1c61 /tests | |
parent | b9f7add531ceab2590e2b24dec7b495950f9870a (diff) |
QNX: check and use elf.h from alternative location
In QNX, instead of #include <elf.h>, we have to use #include <sys/elf.h>
since that file is placed in a subdirectory.
Also removed the previous workaround.
Fixes: QTBUG-97833
Change-Id: Id932a5eeb618a42c8778459cdfd8bb5bf903523c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp index 8994835471..8c68cfde0d 100644 --- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp +++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp @@ -94,14 +94,12 @@ # define PREFIX "lib" #endif -// Workaround for missing elf.h in QNX test environment -// TODO: this can be removed after QTBUG-97833 has been solved -#if defined(Q_OF_ELF) && defined(Q_OS_QNX) && !__has_include(<elf.h>) -#undef Q_OF_ELF +#if defined(Q_OF_ELF) +#if __has_include(<elf.h>) +# include <elf.h> +#else +# include <sys/elf.h> #endif - -#if defined (Q_OF_ELF) -# include <elf.h> # include <memory> # include <functional> @@ -183,7 +181,7 @@ static std::unique_ptr<QTemporaryFile> patchElf(const QString &source, ElfPatche if (QTest::currentTestFailed()) return; \ std::move(r); \ }) -#endif +#endif // Q_OF_ELF static QString sys_qualifiedLibraryName(const QString &fileName) { @@ -395,7 +393,8 @@ void tst_QPluginLoader::deleteinstanceOnUnload() } } -#if defined (Q_OF_ELF) +#if defined(Q_OF_ELF) + void tst_QPluginLoader::loadDebugObj() { #if !defined(QT_SHARED) |