[CRIU] [PATCH] criu/pie: kill util-fd.c
Kir Kolyshkin
kir at openvz.org
Fri Jan 27 09:11:35 PST 2017
The functions it provides, send_fds() and receive_fds(), are already
provided by compel/plugins/std.built-in.o (compel/plugins/std/fds.c)
which is linked into both parasite and restorer.
This fixes the following issue (for some reason, reported on ARMv7,
see https://travis-ci.org/kolyshkin/criu/jobs/195367825):
LINK criu/pie/parasite.built-in.o
GEN criu/pie/parasite.built-in.bin.o
criu/pie/pie.lib.a(util-fd.o): In function `send_fds':
/criu/include/common/scm-code.c:56: multiple definition of `send_fds'
criu/pie/parasite.built-in.o:/criu/include/common/scm-code.c:56: first
defined here
criu/pie/pie.lib.a(util-fd.o): In function `recv_fds':
/criu/include/common/scm-code.c:79: multiple definition of `recv_fds'
criu/pie/parasite.built-in.o:/criu/include/common/scm-code.c:79: first
defined here
criu/pie/Makefile:53: recipe for target
'criu/pie/parasite.built-in.bin.o' failed
make[2]: *** [criu/pie/parasite.built-in.bin.o] Error 1
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
criu/pie/Makefile.library | 2 +-
criu/pie/util-fd.c | 27 ---------------------------
2 files changed, 1 insertion(+), 28 deletions(-)
delete mode 100644 criu/pie/util-fd.c
diff --git a/criu/pie/Makefile.library b/criu/pie/Makefile.library
index f1c5f11..f6a1b42 100644
--- a/criu/pie/Makefile.library
+++ b/criu/pie/Makefile.library
@@ -3,7 +3,7 @@ lib-name := pie.lib.a
CFLAGS += -fno-stack-protector -DCR_NOGLIBC -fpie
LDFLAGS += -z noexecstack
-lib-y += util-fd.o util.o
+lib-y += util.o
ifeq ($(VDSO),y)
lib-y += util-vdso.o parasite-vdso.o ./$(ARCH_DIR)/vdso-pie.o
diff --git a/criu/pie/util-fd.c b/criu/pie/util-fd.c
deleted file mode 100644
index 84b8c5e..0000000
--- a/criu/pie/util-fd.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <sys/mount.h>
-#include <stdbool.h>
-#include <errno.h>
-
-#include "int.h"
-#include "types.h"
-#include "common/compiler.h"
-#include "log.h"
-#include "string.h"
-
-#ifdef CR_NOGLIBC
-# include <compel/plugins/std/syscall.h>
-# define __sys(foo) sys_##foo
-#else
-# define __sys(foo) foo
-#endif
-
-#define __memcpy builtin_memcpy
-
-#include "util-pie.h"
-#include "fcntl.h"
-
-#include "common/bug.h"
-
-#include "common/scm-code.c"
--
2.9.3
More information about the CRIU
mailing list