[CRIU] [PATCH] autofs: fix build on Fedora 22
Pavel Emelyanov
xemul at virtuozzo.com
Mon Mar 21 04:45:53 PDT 2016
On 03/21/2016 10:40 AM, Mike Rapoport wrote:
> 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);
I guess this is due to ea244e177ac612b99644226d5c248abe9bf38a66 from Stas.
The extern declaration of this thing sits in include/namespaces.h but
is called add_ns_shared_cb() :\
-- Pavel
>
> #define LAST_PID_PATH "sys/kernel/ns_last_pid"
>
>
More information about the CRIU
mailing list