The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6844

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Closes #6843.
Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com>
From db5cb1f1db01c0986681f70de34a0c82f43a96f7 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brau...@ubuntu.com>
Date: Thu, 6 Feb 2020 00:09:56 +0100
Subject: [PATCH] lxd/main_checkfeature: don't depend on kcmp header

Closes #6843.
Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com>
---
 lxd/main_checkfeature.go | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lxd/main_checkfeature.go b/lxd/main_checkfeature.go
index a584b00e8a..ac167bdbbc 100644
--- a/lxd/main_checkfeature.go
+++ b/lxd/main_checkfeature.go
@@ -10,7 +10,6 @@ import (
 #endif
 #include <errno.h>
 #include <fcntl.h>
-#include <linux/kcmp.h>
 #include <linux/types.h>
 #include <poll.h>
 #include <stdbool.h>
@@ -161,7 +160,10 @@ static int user_trap_syscall(int nr, unsigned int flags)
 static int filecmp(pid_t pid1, pid_t pid2, int fd1, int fd2)
 {
 #ifdef __NR_kcmp
-       return syscall(__NR_kcmp, pid1, pid2, KCMP_FILE, fd1, fd2);
+#ifndef KCMP_FILE
+#define KCMP_FILE 0
+#endif
+       return syscall(__NR_kcmp, pid1, pid2, 0, fd1, fd2);
 #else
        errno = ENOSYS;
        return -1;
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to