]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Include sys/types.h before fts.h
authorUlf Hermann <ulf.hermann@qt.io>
Thu, 20 Apr 2017 14:45:51 +0000 (16:45 +0200)
committerMark Wielaard <mark@klomp.org>
Tue, 25 Apr 2017 21:50:46 +0000 (23:50 +0200)
The bad fts not only needs to be included before config.h, but also
requires various special types without including sys/types.h.

Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
libdwfl/ChangeLog
libdwfl/linux-kernel-modules.c

index ede6d47100133f2abd91cfeab7bceb18ea806cf8..cc95e06717fa4e09f430b89385fcb2ffb37306bb 100644 (file)
@@ -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
index 7345e760f2ce584812dba3bc7aa7a44fb53fdbb1..893110ae83edb6e4aad4a0ef8c7ed80bdaa45d00 100644 (file)
 
 /* 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