Skip to content

Commit 65fc89e

Browse files
committed
Fix missing Dl_info type
* Dl_info is required when BACKWARD_SYSTEM_LINUX is defined (was a problem for BACKWARD_HAS_DW == 1)
1 parent 7794605 commit 65fc89e

1 file changed

Lines changed: 7 additions & 14 deletions

File tree

backward.hpp

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@
213213
#include <sys/stat.h>
214214
#include <syscall.h>
215215
#include <unistd.h>
216+
#ifndef _GNU_SOURCE
217+
#define _GNU_SOURCE
218+
#include <dlfcn.h>
219+
#undef _GNU_SOURCE
220+
#else
221+
#include <dlfcn.h>
222+
#endif
216223

217224
#if BACKWARD_HAS_BFD == 1
218225
// NOTE: defining PACKAGE{,_VERSION} is required before including
@@ -225,13 +232,6 @@
225232
#define PACKAGE_VERSION
226233
#endif
227234
#include <bfd.h>
228-
#ifndef _GNU_SOURCE
229-
#define _GNU_SOURCE
230-
#include <dlfcn.h>
231-
#undef _GNU_SOURCE
232-
#else
233-
#include <dlfcn.h>
234-
#endif
235235
#endif
236236

237237
#if BACKWARD_HAS_DW == 1
@@ -246,13 +246,6 @@
246246
#include <libdwarf.h>
247247
#include <libelf.h>
248248
#include <map>
249-
#ifndef _GNU_SOURCE
250-
#define _GNU_SOURCE
251-
#include <dlfcn.h>
252-
#undef _GNU_SOURCE
253-
#else
254-
#include <dlfcn.h>
255-
#endif
256249
#endif
257250

258251
#if (BACKWARD_HAS_BACKTRACE == 1) || (BACKWARD_HAS_BACKTRACE_SYMBOL == 1)

0 commit comments

Comments
 (0)