summaryrefslogtreecommitdiffstats
path: root/libdwfl/linux-kernel-modules.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2017-01-11 22:17:39 +0100
committerMark Wielaard <[email protected]>2017-01-11 22:36:37 +0100
commit1376b3517d548f74c12bfcfb74f9412e5df39ebf (patch)
tree53fcc8d67b98379618d636ac5d65a63075826303 /libdwfl/linux-kernel-modules.c
parentea97d8b9b223be012a5ce1dcff7d6f2bf9a6e800 (diff)
parent515dd0acc77673c953380bcf5ccfb05b83c5a3ab (diff)
Merge tag 'elfutils-0.168' into mjw/RH-DTS
elfutils 0.168 release Conflicts: src/Makefile.am tests/Makefile.am
Diffstat (limited to 'libdwfl/linux-kernel-modules.c')
-rw-r--r--libdwfl/linux-kernel-modules.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
index 54c0b908..9cd8ea93 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -26,10 +26,12 @@
the GNU Lesser General Public License along with this program. If
not, see <http://www.gnu.org/licenses/>. */
-/* We include this before config.h because it can't handle _FILE_OFFSET_BITS.
+/* 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. */
-
-#include <fts.h>
+#ifdef BAD_FTS
+ #include <fts.h>
+#endif
#include <config.h>
@@ -44,11 +46,15 @@
#include <fcntl.h>
#include <unistd.h>
-/* Since fts.h is included before config.h, its indirect inclusions may not
+/* If fts.h is included before config.h, its indirect inclusions may not
give us the right LFS aliases of these functions, so map them manually. */
-#ifdef _FILE_OFFSET_BITS
-#define open open64
-#define fopen fopen64
+#ifdef BAD_FTS
+ #ifdef _FILE_OFFSET_BITS
+ #define open open64
+ #define fopen fopen64
+ #endif
+#else
+ #include <fts.h>
#endif