[CRIU] [PATCH] lib: Expose rpc.pb-c.h for _CriuNotify definition

Tycho Andersen tycho.andersen at canonical.com
Wed Jul 30 08:04:48 PDT 2014


Without this, users never get a definiton for _CriuNotify and thus can't
compile anything that uses criu_notify_arg_t without invoking the protobuf
compiler themselves. The symbols are present in libcriu, so adding this as a
public include casues no issues.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 Makefile   | 2 +-
 lib/criu.c | 1 -
 lib/criu.h | 2 ++
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 6ea3bcd..fc33e45 100644
--- a/Makefile
+++ b/Makefile
@@ -114,7 +114,7 @@ SYSCALL-LIB	:= $(ARCH_DIR)/syscalls.built-in.o
 ARCH-LIB	:= $(ARCH_DIR)/crtools.built-in.o
 CRIU-SO		:= libcriu
 CRIU-LIB	:= lib/$(CRIU-SO).so
-CRIU-INC	:= lib/criu.h include/criu-plugin.h include/criu-log.h protobuf/rpc.proto
+CRIU-INC	:= lib/criu.h include/criu-plugin.h include/criu-log.h protobuf/rpc.pb-c.h protobuf/rpc.proto
 
 export CC MAKE CFLAGS LIBS SRCARCH DEFINES MAKEFLAGS CRIU-SO
 export SRC_DIR SYSCALL-LIB SH RM ARCH_DIR OBJCOPY LDARCH LD
diff --git a/lib/criu.c b/lib/criu.c
index eca7cb6..b0bfc4c 100644
--- a/lib/criu.c
+++ b/lib/criu.c
@@ -12,7 +12,6 @@
 #include <signal.h>
 
 #include "criu.h"
-#include "rpc.pb-c.h"
 #include "cr-service-const.h"
 
 const char *criu_lib_version = CRIU_VERSION;
diff --git a/lib/criu.h b/lib/criu.h
index 593aae3..cb702a0 100644
--- a/lib/criu.h
+++ b/lib/criu.h
@@ -22,6 +22,8 @@
 #include <stdbool.h>
 #include <inttypes.h>
 
+#include "rpc.pb-c.h"
+
 void criu_set_service_address(char *path);
 
 /*
-- 
1.9.1



More information about the CRIU mailing list