summaryrefslogtreecommitdiffstats
path: root/libdwfl
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-02-24 16:48:51 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-04-21 13:31:42 +0000
commitf07a88011802b7def6224dbfc0fa8c58bf2d9cdf (patch)
tree2304771e9e62216bc5d98020c0f7521203c36298 /libdwfl
parent3fd4025d5c6d6ba6fcafa502da2c097ad504b2e3 (diff)
Include sys/types.h before fts.h
The bad fts not only needs to be included before config.h, but also requires various special types without including sys/types.h. Change-Id: I31ac8d2aadcf7ffb3efb63583b2745991bfd6f90 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'libdwfl')
-rw-r--r--libdwfl/ChangeLog4
-rw-r--r--libdwfl/linux-kernel-modules.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index ede6d471..cc95e067 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,7 @@
+2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
+
+ * linux-kernel-modules.c: Include sys/types.h before fts.h
+
2017-03-24 Mark Wielaard <mark@klomp.org>
* linux-core-attach.c (core_next_thread): If n_namesz == 0 then
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
index 7345e760..893110ae 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -28,8 +28,11 @@
/* In case we have a bad fts we include this before config.h because it
can't handle _FILE_OFFSET_BITS.
- Everything we need here is fine if its declarations just come first. */
+ Everything we need here is fine if its declarations just come first.
+ Also, include sys/types.h before fts. On some systems fts.h is not self
+ contained. */
#ifdef BAD_FTS
+ #include <sys/types.h>
#include <fts.h>
#endif
@@ -55,6 +58,7 @@
#define fopen fopen64
#endif
#else
+ #include <sys/types.h>
#include <fts.h>
#endif