[lxc-devel] [lxc/master] seccomp: fix compilation on powerpc

brauner on Github lxc-bot at linuxcontainers.org
Fri Oct 16 10:23:44 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 480 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201016/edda5f63/attachment.bin>
-------------- next part --------------
From 50926f4b2c0dc9b26405153b745d6efa5670203f Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Fri, 16 Oct 2020 12:22:57 +0200
Subject: [PATCH] seccomp: fix compilation on powerpc

Link: https://launchpadlibrarian.net/502200189/buildlog_snap_ubuntu_bionic_ppc64el_lxd-latest-edge_BUILDING.txt.gz
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 src/lxc/seccomp.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c
index 8ee68df52e..03c1b54f01 100644
--- a/src/lxc/seccomp.c
+++ b/src/lxc/seccomp.c
@@ -1351,9 +1351,11 @@ static void seccomp_notify_default_answer(int fd, struct seccomp_notif *req,
 	resp->flags = 0;
 
 	if (seccomp_notify_respond(fd, resp))
-		SYSERROR("Failed to send default message to seccomp notification with id(%llu)", resp->id);
+		SYSERROR("Failed to send default message to seccomp notification with id(%llu)",
+			 (long long unsigned int)resp->id);
 	else
-		TRACE("Sent default response for seccomp notification with id(%llu)", resp->id);
+		TRACE("Sent default response for seccomp notification with id(%llu)",
+		      (long long unsigned int)resp->id);
 	memset(resp, 0, handler->conf->seccomp.notifier.sizes.seccomp_notif_resp);
 }
 #endif
@@ -1414,7 +1416,7 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data,
 
 	/* remember the ID in case we receive garbage from the proxy */
 	resp->id = req_id = req->id;
-	TRACE("Received seccomp notification with id(%llu)", req_id);
+	TRACE("Received seccomp notification with id(%llu)", (long long unsigned int)req_id);
 
 	snprintf(mem_path, sizeof(mem_path), "/proc/%d", req->pid);
 	fd_pid = open(mem_path, O_RDONLY | O_DIRECTORY | O_CLOEXEC);
@@ -1439,7 +1441,7 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data,
 	ret = seccomp_notify_id_valid(fd, req->id);
 	if (ret < 0) {
 		seccomp_notify_default_answer(fd, req, resp, hdlr);
-		SYSERROR("Invalid seccomp notify request id(%llu)", req->id);
+		SYSERROR("Invalid seccomp notify request id(%llu)", (long long unsigned int)req->id);
 		goto out;
 	}
 
@@ -1498,7 +1500,8 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data,
 	}
 
 	if (resp->id != req_id) {
-		ERROR("Proxy returned response with illegal id(%llu) != id(%llu)", resp->id, req_id);
+		ERROR("Proxy returned response with illegal id(%llu) != id(%llu)",
+		      (long long unsigned int)resp->id, (long long unsigned int)req_id);
 		resp->id = req_id;
 		seccomp_notify_default_answer(fd, req, resp, hdlr);
 		goto out;
@@ -1512,7 +1515,8 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data,
 	}
 
 	if (resp->id != req_id) {
-		ERROR("Proxy returned response with illegal id(%llu) != id(%llu)", resp->id, req_id);
+		ERROR("Proxy returned response with illegal id(%llu) != id(%llu)",
+		      (long long unsigned int)resp->id, (long long unsigned int)req_id);
 		resp->id = req_id;
 	}
 
@@ -1520,7 +1524,8 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data,
 	if (ret)
 		SYSERROR("Failed to send seccomp notification");
 	else
-		TRACE("Sent response for seccomp notification with id(%llu)", resp->id);
+		TRACE("Sent response for seccomp notification with id(%llu)",
+		      (long long unsigned int)resp->id);
 	memset(resp, 0, conf->seccomp.notifier.sizes.seccomp_notif_resp);
 
 out:


More information about the lxc-devel mailing list