issue #588, part 2

This commit is contained in:
tildearrow 2022-07-14 22:17:05 -05:00
parent 6f90124d82
commit 3df5a6e2b6
1 changed files with 8 additions and 14 deletions

View File

@ -221,6 +221,14 @@
#include <sys/stat.h>
#include <syscall.h>
#include <unistd.h>
// https://github.com/tildearrow/furnace/issues/588
#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
@ -233,13 +241,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
@ -254,13 +255,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)