diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2022-08-25 06:17:05 -0700 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2022-08-25 22:55:48 -0400 |
| commit | da285876dc69caa41064470922e45d922551f6b1 (patch) | |
| tree | 5de9848ba6428e90ae118aec4ac46726c4d3446d | |
| parent | c16d3a58eeb19f82e3da2aae9652779d01347359 (diff) | |
| download | meta-virtualization-da285876dc69caa41064470922e45d922551f6b1.tar.gz | |
lxc: fix compilation error for ARM/ARM64
There's compilation error when building lxc for ARM/ARM64 BSPs.
The error message is as below:
| ../git/src/lxc/cgroups/cgfsng.c:1234:111: error: incompatible
type for argument 10 of 'sd_bus_call_method_asyncv'
The 10th argument is of type va_list but NULL is supplied, thus causing
compilation error.
So we use sd_bus_call_method_async to replace the asyncv one to
solve this issue.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | recipes-containers/lxc/files/0001-use-sd_bus_call_method_async-to-replace-the-asyncv-o.patch | 49 | ||||
| -rw-r--r-- | recipes-containers/lxc/lxc_git.bb | 1 |
2 files changed, 50 insertions, 0 deletions
diff --git a/recipes-containers/lxc/files/0001-use-sd_bus_call_method_async-to-replace-the-asyncv-o.patch b/recipes-containers/lxc/files/0001-use-sd_bus_call_method_async-to-replace-the-asyncv-o.patch new file mode 100644 index 00000000..ef87a0ce --- /dev/null +++ b/recipes-containers/lxc/files/0001-use-sd_bus_call_method_async-to-replace-the-asyncv-o.patch | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | From b0abedf60b40adf0f2fb3cf9dfee4bc601f7b39f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
| 3 | Date: Thu, 25 Aug 2022 05:45:53 -0700 | ||
| 4 | Subject: [PATCH] use sd_bus_call_method_async to replace the asyncv one | ||
| 5 | |||
| 6 | The sd_bus_call_method_asyncv's 10th parameter is of type | ||
| 7 | va_list and supplying NULL when invoking it causes compilation | ||
| 8 | error. Just replace it with the async one. | ||
| 9 | |||
| 10 | Upstream-Status: Submitted [https://github.com/lxc/lxc/pull/4187] | ||
| 11 | |||
| 12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 13 | --- | ||
| 14 | meson.build | 4 ++-- | ||
| 15 | src/lxc/cgroups/cgfsng.c | 2 +- | ||
| 16 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/meson.build b/meson.build | ||
| 19 | index 21955a050..f8bdcf4e8 100644 | ||
| 20 | --- a/meson.build | ||
| 21 | +++ b/meson.build | ||
| 22 | @@ -295,9 +295,9 @@ if not want_sd_bus.disabled() | ||
| 23 | has_sd_bus = false | ||
| 24 | endif | ||
| 25 | |||
| 26 | - if not cc.has_function('sd_bus_call_method_asyncv', prefix: '#include <systemd/sd-bus.h>', dependencies: libsystemd) | ||
| 27 | + if not cc.has_function('sd_bus_call_method_async', prefix: '#include <systemd/sd-bus.h>', dependencies: libsystemd) | ||
| 28 | if not sd_bus_optional | ||
| 29 | - error('libsystemd misses required sd_bus_call_method_asyncv function') | ||
| 30 | + error('libsystemd misses required sd_bus_call_method_async function') | ||
| 31 | endif | ||
| 32 | |||
| 33 | has_sd_bus = false | ||
| 34 | diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c | ||
| 35 | index 8a3615893..d90e5385e 100644 | ||
| 36 | --- a/src/lxc/cgroups/cgfsng.c | ||
| 37 | +++ b/src/lxc/cgroups/cgfsng.c | ||
| 38 | @@ -1232,7 +1232,7 @@ static int unpriv_systemd_create_scope(struct cgroup_ops *ops, struct lxc_conf * | ||
| 39 | if (r < 0) | ||
| 40 | return log_error(SYSTEMD_SCOPE_FAILED, "Failed to connect to user bus: %s", strerror(-r)); | ||
| 41 | |||
| 42 | - r = sd_bus_call_method_asyncv(bus, NULL, DESTINATION, PATH, INTERFACE, "Subscribe", NULL, NULL, NULL, NULL); | ||
| 43 | + r = sd_bus_call_method_async(bus, NULL, DESTINATION, PATH, INTERFACE, "Subscribe", NULL, NULL, NULL); | ||
| 44 | if (r < 0) | ||
| 45 | return log_error(SYSTEMD_SCOPE_FAILED, "Failed to subscribe to signals: %s", strerror(-r)); | ||
| 46 | |||
| 47 | -- | ||
| 48 | 2.37.1 | ||
| 49 | |||
diff --git a/recipes-containers/lxc/lxc_git.bb b/recipes-containers/lxc/lxc_git.bb index bcc17953..9cabe054 100644 --- a/recipes-containers/lxc/lxc_git.bb +++ b/recipes-containers/lxc/lxc_git.bb | |||
| @@ -44,6 +44,7 @@ SRC_URI = "git://github.com/lxc/lxc.git;branch=master;protocol=https \ | |||
| 44 | file://templates-use-curl-instead-of-wget.patch \ | 44 | file://templates-use-curl-instead-of-wget.patch \ |
| 45 | file://0001-download-don-t-try-compatbility-index.patch \ | 45 | file://0001-download-don-t-try-compatbility-index.patch \ |
| 46 | file://tests-our-init-is-not-busybox.patch \ | 46 | file://tests-our-init-is-not-busybox.patch \ |
| 47 | file://0001-use-sd_bus_call_method_async-to-replace-the-asyncv-o.patch \ | ||
| 47 | file://dnsmasq.conf \ | 48 | file://dnsmasq.conf \ |
| 48 | file://lxc-net \ | 49 | file://lxc-net \ |
| 49 | " | 50 | " |
