From 99c787631013bacf71c27dcac16d5a55b82be1c2 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Mon, 2 Jul 2018 19:42:41 +1200 Subject: [PATCH] On glibc, include sysmacros.h directly On glibc, major, minor, and makedev are all defined in sys/sysmacros.h with types.h only including this for historical reasons. A future release of glibc will remove this behaviour, meaning that major, minor, and makedev will no longer be defined for us without including sysmacros.h. --- ls.c | 3 +++ tar.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/ls.c b/ls.c index b716aba..7de15ac 100644 --- a/ls.c +++ b/ls.c @@ -1,6 +1,9 @@ /* See LICENSE file for copyright and license details. */ #include #include +#ifdef __GLIBC__ +#include +#endif #include #include diff --git a/tar.c b/tar.c index a6ead2e..fb0df45 100644 --- a/tar.c +++ b/tar.c @@ -1,6 +1,10 @@ /* See LICENSE file for copyright and license details. */ #include #include +#include +#ifdef __GLIBC__ +#include +#endif #include #include