diff options
| author | RameshkrishnanX Geddy Sekar <rameshkrishnanx.geddy.sekar@intel.com> | 2021-04-17 03:34:25 +0800 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-04-18 20:10:00 -0400 |
| commit | d65587d727f8c71186f64e79a30bae828a58b53d (patch) | |
| tree | 2be3c991a33398648ad44aff273d3eb036718b73 /recipes-containers/lxc/files/commands-fix-check-for-seccomp-notify-support.patch | |
| parent | 34112b45c6d9bac1c6c3870ce323dccf097d8710 (diff) | |
| download | meta-virtualization-d65587d727f8c71186f64e79a30bae828a58b53d.tar.gz | |
lxc-recipe: Fix compilation without seccomp when libseccomp is installed
Original URL: https://github.com/lxc/lxc/pull/3623
Signed-off-by: RameshkrishnanX Geddy Sekar <rameshkrishnanx.geddy.sekar@intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/lxc/files/commands-fix-check-for-seccomp-notify-support.patch')
| -rw-r--r-- | recipes-containers/lxc/files/commands-fix-check-for-seccomp-notify-support.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/recipes-containers/lxc/files/commands-fix-check-for-seccomp-notify-support.patch b/recipes-containers/lxc/files/commands-fix-check-for-seccomp-notify-support.patch new file mode 100644 index 00000000..391af381 --- /dev/null +++ b/recipes-containers/lxc/files/commands-fix-check-for-seccomp-notify-support.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From a342b11fedb3010630de4909ca707ebdc0862060 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Eneas U de Queiroz <cotequeiroz@gmail.com> | ||
| 3 | Date: Fri, 25 Dec 2020 13:54:14 -0300 | ||
| 4 | Subject: [PATCH] commands: fix check for seccomp notify support | ||
| 5 | |||
| 6 | Use HAVE_SECCOMP_NOTIFY instead of HAVE_DECL_SECCOMP_NOTIFY_FD. | ||
| 7 | Currently the latter will be true if the declaration is found by | ||
| 8 | configure, even if 'configure --disable-seccomp' is used. | ||
| 9 | |||
| 10 | HAVE_SECCOMP_NOTIFY is defined in lxcseccomp.h if both HAVE_SECCOMP and | ||
| 11 | HAVE_DECL_SECCOMP_NOTIFY_FD are true, which is the correct behavior. | ||
| 12 | |||
| 13 | Upstream-status: submitted https://github.com/lxc/lxc/pull/3623 | ||
| 14 | |||
| 15 | Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com> | ||
| 16 | --- | ||
| 17 | src/lxc/commands.c | 4 ++-- | ||
| 18 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/src/lxc/commands.c b/src/lxc/commands.c | ||
| 21 | index a9a03ca2c..37d1abcef 100644 | ||
| 22 | --- a/src/lxc/commands.c | ||
| 23 | +++ b/src/lxc/commands.c | ||
| 24 | @@ -501,7 +501,7 @@ static int lxc_cmd_get_devpts_fd_callback(int fd, struct lxc_cmd_req *req, | ||
| 25 | |||
| 26 | int lxc_cmd_get_seccomp_notify_fd(const char *name, const char *lxcpath) | ||
| 27 | { | ||
| 28 | -#if HAVE_DECL_SECCOMP_NOTIFY_FD | ||
| 29 | +#ifdef HAVE_SECCOMP_NOTIFY | ||
| 30 | int ret, stopped; | ||
| 31 | struct lxc_cmd_rr cmd = { | ||
| 32 | .req = { | ||
| 33 | @@ -526,7 +526,7 @@ static int lxc_cmd_get_seccomp_notify_fd_callback(int fd, struct lxc_cmd_req *re | ||
| 34 | struct lxc_handler *handler, | ||
| 35 | struct lxc_epoll_descr *descr) | ||
| 36 | { | ||
| 37 | -#if HAVE_DECL_SECCOMP_NOTIFY_FD | ||
| 38 | +#ifdef HAVE_SECCOMP_NOTIFY | ||
| 39 | struct lxc_cmd_rsp rsp = { | ||
| 40 | .ret = 0, | ||
| 41 | }; | ||
| 42 | -- | ||
| 43 | 2.17.1 | ||
| 44 | |||
