summaryrefslogtreecommitdiffstats
path: root/libdwfl
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-03-08 10:20:48 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-04-21 16:36:36 +0000
commit817d0d17efd9a7646285c64945089d2056499756 (patch)
tree8a376a6cd581e7fd39cc8a45e2df64db0915b7a9 /libdwfl
parent948852f9b694abfda2fc380daf3007e73abe9288 (diff)
Make __attribute__ conditional in all installed headers
__attribute__ is a GNU extension. If we want to link against the libraries using a different compiler, it needs to be disabled. It was already disabled in libdw.h, and this patch extends this to the other headers. We move the defines to libelf.h as that is included in all the others. Change-Id: I6e22674641f19f5a8820e2c7c7ec46f2fd70a8af Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'libdwfl')
-rw-r--r--libdwfl/ChangeLog4
-rw-r--r--libdwfl/libdwfl.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 85d1b81b..0692fd6b 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,5 +1,9 @@
2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
+ * libdwfl.h: Use __const_attribute__.
+
+2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
+
* dwfl_frame.c: Drop unused sys/ptrace.h include.
* frame_unwind.c: Likewise.
* linux-pid-attach.c: Include sys/ptrace.h and sys/syscall.h only on
diff --git a/libdwfl/libdwfl.h b/libdwfl/libdwfl.h
index aea8b993..a0c1d357 100644
--- a/libdwfl/libdwfl.h
+++ b/libdwfl/libdwfl.h
@@ -385,7 +385,7 @@ extern int dwfl_linux_proc_find_elf (Dwfl_Module *mod, void **userdata,
/* Standard argument parsing for using a standard callback set. */
struct argp;
-extern const struct argp *dwfl_standard_argp (void) __attribute__ ((const));
+extern const struct argp *dwfl_standard_argp (void) __const_attribute__;
/*** Relocation of addresses from Dwfl ***/