[CRIU] [PATCH] headers: Explicitly require inttypes.h when %PRI helpers are used

Cyrill Gorcunov gorcunov at openvz.org
Thu Apr 24 10:00:02 PDT 2014


https://bugzilla.openvz.org/show_bug.cgi?id=2949

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 cr-dump.c      | 1 +
 cr-restore.c   | 1 +
 cr-show.c      | 1 +
 eventfd.c      | 1 +
 eventpoll.c    | 1 +
 file-lock.c    | 1 +
 files-reg.c    | 1 +
 files.c        | 1 +
 fsnotify.c     | 1 +
 ipc_ns.c       | 1 +
 kerndat.c      | 1 +
 mem.c          | 1 +
 page-read.c    | 1 +
 page-xfer.c    | 1 +
 pie/restorer.c | 1 +
 proc_parse.c   | 1 +
 shmem.c        | 1 +
 sk-packet.c    | 1 +
 sysctl.c       | 1 +
 util.c         | 1 +
 20 files changed, 20 insertions(+)

diff --git a/cr-dump.c b/cr-dump.c
index 86351e5c4a5b..1be3552c67c2 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -7,6 +7,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <string.h>
+#include <inttypes.h>
 
 #include <fcntl.h>
 
diff --git a/cr-restore.c b/cr-restore.c
index 1ff0ffaa65d9..a5f14fa10815 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -6,6 +6,7 @@
 #include <errno.h>
 #include <dirent.h>
 #include <string.h>
+#include <inttypes.h>
 
 #include <fcntl.h>
 #include <grp.h>
diff --git a/cr-show.c b/cr-show.c
index 191cc638129c..e3fbaf1bfc23 100644
--- a/cr-show.c
+++ b/cr-show.c
@@ -6,6 +6,7 @@
 #include <errno.h>
 #include <string.h>
 #include <ctype.h>
+#include <inttypes.h>
 
 #include <fcntl.h>
 
diff --git a/eventfd.c b/eventfd.c
index e975eece473f..383632c896b7 100644
--- a/eventfd.c
+++ b/eventfd.c
@@ -6,6 +6,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <limits.h>
+#include <inttypes.h>
 #include <sys/stat.h>
 #include <sys/statfs.h>
 #include <sys/types.h>
diff --git a/eventpoll.c b/eventpoll.c
index 88b331f1a198..9e0252d6b6f6 100644
--- a/eventpoll.c
+++ b/eventpoll.c
@@ -6,6 +6,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <limits.h>
+#include <inttypes.h>
 #include <sys/stat.h>
 #include <sys/statfs.h>
 #include <sys/types.h>
diff --git a/file-lock.c b/file-lock.c
index 5276d2ea5d6d..b4cbb14872af 100644
--- a/file-lock.c
+++ b/file-lock.c
@@ -3,6 +3,7 @@
 #include <sys/file.h>
 #include <fcntl.h>
 #include <string.h>
+#include <inttypes.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
diff --git a/files-reg.c b/files-reg.c
index 0e090a29194b..e83bbac083d7 100644
--- a/files-reg.c
+++ b/files-reg.c
@@ -7,6 +7,7 @@
 #include <sys/stat.h>
 #include <sys/vfs.h>
 #include <ctype.h>
+#include <inttypes.h>
 
 /* Stolen from kernel/fs/nfs/unlink.c */
 #define SILLYNAME_PREF ".nfs"
diff --git a/files.c b/files.c
index 96f0330f93e1..33c29892c80e 100644
--- a/files.c
+++ b/files.c
@@ -1,6 +1,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
+#include <inttypes.h>
 
 #include <linux/limits.h>
 #include <linux/major.h>
diff --git a/fsnotify.c b/fsnotify.c
index eed881a2d5f5..178c611c1555 100644
--- a/fsnotify.c
+++ b/fsnotify.c
@@ -9,6 +9,7 @@
 #include <utime.h>
 #include <dirent.h>
 #include <limits.h>
+#include <inttypes.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/inotify.h>
diff --git a/ipc_ns.c b/ipc_ns.c
index a997fb4e0076..a7384d728e4b 100644
--- a/ipc_ns.c
+++ b/ipc_ns.c
@@ -2,6 +2,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
+#include <inttypes.h>
 #include <sys/wait.h>
 #include <sys/msg.h>
 #include <sys/sem.h>
diff --git a/kerndat.c b/kerndat.c
index 2ba1edb06aff..28c88df81ed2 100644
--- a/kerndat.c
+++ b/kerndat.c
@@ -1,6 +1,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdio.h>
+#include <inttypes.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/mman.h>
diff --git a/mem.c b/mem.c
index 757bca7728ce..25d312ab5d51 100644
--- a/mem.c
+++ b/mem.c
@@ -3,6 +3,7 @@
 #include <sys/mman.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <inttypes.h>
 
 #include "cr_options.h"
 #include "servicefd.h"
diff --git a/page-read.c b/page-read.c
index 8937f33e0b30..ae734c46e7c6 100644
--- a/page-read.c
+++ b/page-read.c
@@ -1,6 +1,7 @@
 #include <fcntl.h>
 #include <stdio.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #include "image.h"
 #include "cr_options.h"
diff --git a/page-xfer.c b/page-xfer.c
index 56e85759c6ba..f940965f5f88 100644
--- a/page-xfer.c
+++ b/page-xfer.c
@@ -4,6 +4,7 @@
 #include <linux/falloc.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <inttypes.h>
 
 #include "cr_options.h"
 #include "servicefd.h"
diff --git a/pie/restorer.c b/pie/restorer.c
index f0a2d3e55309..d3a9b5b0fa2b 100644
--- a/pie/restorer.c
+++ b/pie/restorer.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <inttypes.h>
 
 #include <linux/securebits.h>
 #include <linux/capability.h>
diff --git a/proc_parse.c b/proc_parse.c
index 26686d47e71a..22b1158b6651 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -7,6 +7,7 @@
 #include <errno.h>
 #include <sys/stat.h>
 #include <string.h>
+#include <inttypes.h>
 #include <linux/fs.h>
 
 #include "asm/types.h"
diff --git a/shmem.c b/shmem.c
index 6e143323ca40..f7c6155b76f9 100644
--- a/shmem.c
+++ b/shmem.c
@@ -2,6 +2,7 @@
 #include <sys/mman.h>
 #include <stdlib.h>
 #include <fcntl.h>
+#include <inttypes.h>
 
 #include "pid.h"
 #include "shmem.h"
diff --git a/sk-packet.c b/sk-packet.c
index 410da8fad9cb..fcbee50dc9fc 100644
--- a/sk-packet.c
+++ b/sk-packet.c
@@ -4,6 +4,7 @@
 #include <linux/rtnetlink.h>
 #include <unistd.h>
 #include <string.h>
+#include <inttypes.h>
 #include "asm/types.h"
 #include "fdset.h"
 #include "files.h"
diff --git a/sysctl.c b/sysctl.c
index 505127d9e457..e3586fa7c958 100644
--- a/sysctl.c
+++ b/sysctl.c
@@ -3,6 +3,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <stdlib.h>
+#include <inttypes.h>
 
 #include "asm/types.h"
 #include "sysctl.h"
diff --git a/util.c b/util.c
index 81f174166a46..8aa72bf06fd6 100644
--- a/util.c
+++ b/util.c
@@ -16,6 +16,7 @@
 #include <dirent.h>
 #include <sys/sendfile.h>
 #include <fcntl.h>
+#include <inttypes.h>
 
 #include <sys/param.h>
 #include <sys/types.h>
-- 
1.8.3.1



More information about the CRIU mailing list