[CRIU] [PATCH 2/3] scm: common -- Hide struct fd_opts argument

Cyrill Gorcunov gorcunov at openvz.org
Mon Nov 14 12:01:16 PST 2016


When SCM_FDSET_HAS_OPTS is not set the scm-code.c
can't be built because it declares struct fd_opts
in parameters. Lets rather hide this type and
allow to build without SCM_FDSET_HAS_OPTS definition.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 include/common/scm-code.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/common/scm-code.c b/include/common/scm-code.c
index 015ca564321c..59a330a633a0 100644
--- a/include/common/scm-code.c
+++ b/include/common/scm-code.c
@@ -118,7 +118,11 @@ int send_fds(int sock, struct sockaddr_un *saddr, int len,
 	return 0;
 }
 
+#ifdef SCM_FDSET_HAS_OPTS
 int recv_fds(int sock, int *fds, int nr_fds, struct fd_opts *opts)
+#else
+int recv_fds(int sock, int *fds, int nr_fds, char *opts)
+#endif
 {
 	struct scm_fdset fdset;
 	struct cmsghdr *cmsg;
-- 
2.7.4



More information about the CRIU mailing list