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  | 2 +-
 tar.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/ls.c b/ls.c
index b716aba..884776f 100644
--- a/ls.c
+++ b/ls.c
@@ -1,6 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <sys/stat.h>
-#include <sys/types.h>
+#include <sys/sysmacros.h>
 
 #include <dirent.h>
 #include <grp.h>
diff --git a/tar.c b/tar.c
index a6ead2e..9359bfd 100644
--- a/tar.c
+++ b/tar.c
@@ -1,6 +1,7 @@
 /* See LICENSE file for copyright and license details. */
 #include <sys/stat.h>
 #include <sys/time.h>
+#include <sys/sysmacros.h>
 
 #include <errno.h>
 #include <fcntl.h>
-- 
2.17.1


Reply via email to