public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Include sys/types.h before fts.h
@ 2017-04-20 13:26 Ulf Hermann
  2017-04-20 14:37 ` Dmitry V. Levin
  0 siblings, 1 reply; 2+ messages in thread
From: Ulf Hermann @ 2017-04-20 13:26 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.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Include sys/types.h before fts.h
  2017-04-20 13:26 [PATCH] Include sys/types.h before fts.h Ulf Hermann
@ 2017-04-20 14:37 ` Dmitry V. Levin
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry V. Levin @ 2017-04-20 14:37 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 341 bytes --]

On Thu, Apr 20, 2017 at 03:26:47PM +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.

Please do not include <sys/types.h> before <config.h> unconditionally.
If bad fts needs <sys/types.h>, then do it [BAD_FTS].


-- 
ldv

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-20 14:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20 13:26 [PATCH] Include sys/types.h before fts.h Ulf Hermann
2017-04-20 14:37 ` Dmitry V. Levin

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).