* [PATCH v2] Include sys/types.h before fts.h
@ 2017-04-20 14:45 Ulf Hermann
2017-04-25 22:44 ` Mark Wielaard
0 siblings, 1 reply; 2+ messages in thread
From: Ulf Hermann @ 2017-04-20 14:45 UTC (permalink / raw)
To: elfutils-devel
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
Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
---
libdwfl/ChangeLog | 4 ++++
libdwfl/linux-kernel-modules.c | 6 +++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index ede6d47..cc95e06 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 7345e76..893110a 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
--
2.1.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] Include sys/types.h before fts.h
2017-04-20 14:45 [PATCH v2] Include sys/types.h before fts.h Ulf Hermann
@ 2017-04-25 22:44 ` Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2017-04-25 22:44 UTC (permalink / raw)
To: Ulf Hermann; +Cc: elfutils-devel
On Thu, Apr 20, 2017 at 04:45:51PM +0200, Ulf Hermann wrote:
> 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
> Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
Thanks pushed to master.
But I removed the Change-Id since I don't know how it is helpful.
Cheers,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-25 21:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20 14:45 [PATCH v2] Include sys/types.h before fts.h Ulf Hermann
2017-04-25 22:44 ` Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).