[CRIU] [PATCH] autofs: fix build on Fedora 22

Mike Rapoport rapoport at il.ibm.com
Mon Mar 21 00:40:38 PDT 2016


The following error happens when building CRIU on Fedora 22:

  CC       autofs.o
autofs.c: In function ‘autofs_mount’:
autofs.c:892:9: error: implicit declaration of function ‘add_post_prepare_cb’ [-Werror=implicit-function-declaration]
   ret = add_post_prepare_cb(autofs_add_mount_info, mi);
         ^
cc1: all warnings being treated as errors

Adding forward declaration of add_post_prepare_cb resolves the issue.

Signed-off-by: Mike Rapoport <rapoport at il.ibm.com>
---
 criu/autofs.c          | 1 +
 criu/include/crtools.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/criu/autofs.c b/criu/autofs.c
index 1c7c126..961f370 100644
--- a/criu/autofs.c
+++ b/criu/autofs.c
@@ -11,6 +11,7 @@
 #include "namespaces.h"
 #include "protobuf.h"
 #include "pipes.h"
+#include "crtools.h"
 
 #include "images/autofs.pb-c.h"
 
diff --git a/criu/include/crtools.h b/criu/include/crtools.h
index 49ba0cc..6de163b 100644
--- a/criu/include/crtools.h
+++ b/criu/include/crtools.h
@@ -15,6 +15,7 @@
 extern int check_img_inventory(void);
 extern int write_img_inventory(InventoryEntry *he);
 extern int prepare_inventory(InventoryEntry *he);
+extern int add_post_prepare_cb(int (*actor)(void *data), void *data);
 
 #define LAST_PID_PATH		"sys/kernel/ns_last_pid"
 
-- 
1.9.1



More information about the CRIU mailing list