From: Duncan Bellamy Date: Thu, 12 Oct 2023 10:06:52 +0000 (+0000) Subject: [Fix] backport fix for dlfcn.h from backward-cpp X-Git-Tag: 3.7.2~17^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F4639%2Fhead;p=thirdparty%2Frspamd.git [Fix] backport fix for dlfcn.h from backward-cpp https://github.com/bombela/backward-cpp/commit/65fc89e210655aaa707337bc21d19f45805ac8a2 backport fix for powerpc as well https://github.com/bombela/backward-cpp/commit/4bec538c996e155d487db9aef0fc2f1996202f8e --- diff --git a/contrib/backward-cpp/backward.hpp b/contrib/backward-cpp/backward.hpp index ac7ad51738..b853f8308a 100644 --- a/contrib/backward-cpp/backward.hpp +++ b/contrib/backward-cpp/backward.hpp @@ -211,10 +211,23 @@ #else #include #endif +#if defined(__ppc__) || defined(__powerpc) || defined(__powerpc__) || \ + defined(__POWERPC__) +// Linux kernel header required for the struct pt_regs definition +// to access the NIP (Next Instruction Pointer) register value +#include +#endif #include #include #include #include +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#include +#undef _GNU_SOURCE +#else +#include +#endif #if BACKWARD_HAS_BFD == 1 // NOTE: defining PACKAGE{,_VERSION} is required before including @@ -227,13 +240,6 @@ #define PACKAGE_VERSION #endif #include -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#include -#undef _GNU_SOURCE -#else -#include -#endif #endif #if BACKWARD_HAS_DW == 1 @@ -248,13 +254,6 @@ #include #include #include -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#include -#undef _GNU_SOURCE -#else -#include -#endif #endif #if (BACKWARD_HAS_BACKTRACE == 1) || (BACKWARD_HAS_BACKTRACE_SYMBOL == 1)