[hackers] [PATCH] [sbase] Include sysmacros.h directly rather than types.h

From: David Phillips <david_AT_sighup.nz>
Date: Mon, 2 Jul 2018 19:48:03 +1200

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
_AT_@ -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
_AT_@ -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
Received on Mon Jul 02 2018 - 09:48:03 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 02 2018 - 09:48:28 CEST