diff options
author | Michał Łoś <michal.los@siili.com> | 2023-09-15 09:01:44 +0200 |
---|---|---|
committer | Michał Łoś <michal.los@siili.com> | 2023-10-26 10:57:31 +0200 |
commit | 3f8de9d3272d6ea1ea76420f593dc4fa9e8ab09f (patch) | |
tree | 8cc3b3da8293fd37f5adb17309080544ecbc1697 /src/corelib/plugin/qelfparser_p.cpp | |
parent | 799bfe94e8c17c0ff890c45b22d670d3bc8778c9 (diff) |
Define PN_XNUM if not defined in elf.h
VxWorks elf.h (nor any other header in its SDK) doesn't contain
definition of PN_XNUM, which meaning is the limit of program headers in
ELF structure, related to `e_phnum` field of `Elf{32,64}_Ehdr`
structures. Since these fields have identical type and seemingly
identical meaning, we can safely assume that its maximum value will be
the same on both systems.
Define PN_XNUM if it's not defined with `0xffff` value taken from
Linux and Solaris related headers.
Fixes: QTBUG-118135
Change-Id: I5a0dab1d1d18e165d01e80823a02f7df644fc7e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/plugin/qelfparser_p.cpp')
-rw-r--r-- | src/corelib/plugin/qelfparser_p.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp index f994b9970f..0bbadb2933 100644 --- a/src/corelib/plugin/qelfparser_p.cpp +++ b/src/corelib/plugin/qelfparser_p.cpp @@ -54,6 +54,10 @@ static Q_LOGGING_CATEGORY(lcElfParser, "qt.core.plugin.elfparser") # define PT_GNU_PROPERTY 0x6474e553 #endif +#ifndef PN_XNUM +# define PN_XNUM 0xffff +#endif + QT_WARNING_PUSH QT_WARNING_DISABLE_CLANG("-Wunused-const-variable") |