[CRIU] [PATCH] include sys/sysmacros.h for minor/major/makedev funcs

Mike Frysinger vapier at gentoo.org
Wed Dec 7 07:40:57 PST 2016


From: Yixun Lan <dlan at gentoo.org>

Since glibc is moving away from implicitly including sys/sysmacros.h
all the time via sys/types.h, include the header directly in more
places.  This seems to cover most makedev/major/minor usage.

Signed-off-by: Yixun Lan <dlan at gentoo.org>
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 criu/file-lock.c           | 1 +
 criu/include/util.h        | 1 +
 criu/kerndat.c             | 1 +
 criu/proc_parse.c          | 1 +
 test/zdtm/lib/fs.h         | 1 +
 test/zdtm/static/console.c | 1 +
 6 files changed, 6 insertions(+)

diff --git a/criu/file-lock.c b/criu/file-lock.c
index 1ab1e5886965..11d8a194937a 100644
--- a/criu/file-lock.c
+++ b/criu/file-lock.c
@@ -5,6 +5,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 
 #include "cr_options.h"
 #include "imgset.h"
diff --git a/criu/include/util.h b/criu/include/util.h
index 8eaee33391c5..1aa40e863acb 100644
--- a/criu/include/util.h
+++ b/criu/include/util.h
@@ -10,6 +10,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/statfs.h>
+#include <sys/sysmacros.h>
 #include <dirent.h>
 
 #include "int.h"
diff --git a/criu/kerndat.c b/criu/kerndat.c
index f9675bd7ec1d..aeef1b7f6640 100644
--- a/criu/kerndat.c
+++ b/criu/kerndat.c
@@ -7,6 +7,7 @@
 #include <sys/mman.h>
 #include <errno.h>
 #include <sys/syscall.h>
+#include <sys/sysmacros.h>
 
 #include "int.h"
 #include "log.h"
diff --git a/criu/proc_parse.c b/criu/proc_parse.c
index 3f84cdaad99a..a86d31769ded 100644
--- a/criu/proc_parse.c
+++ b/criu/proc_parse.c
@@ -9,6 +9,7 @@
 #include <string.h>
 #include <ctype.h>
 #include <linux/fs.h>
+#include <sys/sysmacros.h>
 
 #include "types.h"
 #include "common/list.h"
diff --git a/test/zdtm/lib/fs.h b/test/zdtm/lib/fs.h
index 972c49b4a068..972b15abad0c 100644
--- a/test/zdtm/lib/fs.h
+++ b/test/zdtm/lib/fs.h
@@ -6,6 +6,7 @@
 #endif
 
 #include <sys/types.h>
+#include <sys/sysmacros.h>
 
 #include <limits.h>
 
diff --git a/test/zdtm/static/console.c b/test/zdtm/static/console.c
index a86b14639729..41246aea0298 100644
--- a/test/zdtm/static/console.c
+++ b/test/zdtm/static/console.c
@@ -8,6 +8,7 @@
 
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <sys/sysmacros.h>
 
 #include "zdtmtst.h"
 
-- 
2.11.0.rc2



More information about the CRIU mailing list