This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[PATCH] Include sys/types.h before fts.h
- From: Ulf Hermann <ulf dot hermann at qt dot io>
- To: <elfutils-devel at sourceware dot org>
- Date: Thu, 20 Apr 2017 15:26:47 +0200
- Subject: [PATCH] Include sys/types.h before fts.h
- Authentication-results: sourceware.org; auth=none
- Authentication-results: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=qt.io;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qtcompany.onmicrosoft.com; s=selector1-qt-io; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hp80W+l7jSunKYACnWTsKsQj4DglyjdIKguq62eiQPA=; b=VqRXMjPw9bJAb+FxA2cKM11ya1/13/QdpvsEownIkq9yj+oZaZl+SqpJBrHEUNn6lSTLlbJwdV4j0x/H6un7fZ7ZelzIRPuyjWxgKoRlvWfr6J0561wsQLu0wi1dDinVtQu8DxBcN/5o8UNY4NbagJb+ur55rbgRsXnR9FQV5qs=
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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 | 4 ++++
libdwfl/linux-kernel-modules.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index ede6d47..1ed9dd4 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..757eace 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -26,6 +26,10 @@
the GNU Lesser General Public License along with this program. If
not, see <http://www.gnu.org/licenses/>. */
+/* Include sys/types.h before fts. On some systems fts.h is not self
+ contained. */
+#include <sys/types.h>
+
/* 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. */
--
2.1.4