diff options
author | Duncan Bellamy <dunk@denkimushi.com> | 2023-10-12 10:06:52 +0000 |
---|---|---|
committer | Duncan Bellamy <dunk@denkimushi.com> | 2023-10-12 10:15:41 +0000 |
commit | 112bedbaa95e3199bd1f284696beb6000a12b722 (patch) | |
tree | c16e83bffb5a6ded03f7f393a14b59b69d20d3ea /contrib | |
parent | 6d16d5e9ef7bcd0e5c3cd841d1a5df139f301463 (diff) | |
download | rspamd-112bedbaa95e3199bd1f284696beb6000a12b722.tar.gz rspamd-112bedbaa95e3199bd1f284696beb6000a12b722.zip |
[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
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/backward-cpp/backward.hpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/contrib/backward-cpp/backward.hpp b/contrib/backward-cpp/backward.hpp index ac7ad5173..b853f8308 100644 --- a/contrib/backward-cpp/backward.hpp +++ b/contrib/backward-cpp/backward.hpp @@ -211,10 +211,23 @@ #else #include <link.h> #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 <asm/ptrace.h> +#endif #include <signal.h> #include <sys/stat.h> #include <syscall.h> #include <unistd.h> +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#include <dlfcn.h> +#undef _GNU_SOURCE +#else +#include <dlfcn.h> +#endif #if BACKWARD_HAS_BFD == 1 // NOTE: defining PACKAGE{,_VERSION} is required before including @@ -227,13 +240,6 @@ #define PACKAGE_VERSION #endif #include <bfd.h> -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#include <dlfcn.h> -#undef _GNU_SOURCE -#else -#include <dlfcn.h> -#endif #endif #if BACKWARD_HAS_DW == 1 @@ -248,13 +254,6 @@ #include <libdwarf.h> #include <libelf.h> #include <map> -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#include <dlfcn.h> -#undef _GNU_SOURCE -#else -#include <dlfcn.h> -#endif #endif #if (BACKWARD_HAS_BACKTRACE == 1) || (BACKWARD_HAS_BACKTRACE_SYMBOL == 1) |