* [Buildroot] [PATCH 1/1] package/lxc: fix systemd build
@ 2022-11-11 22:42 Fabrice Fontaine
2022-11-11 22:51 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-11-11 22:42 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine, Jérôme Pouiller
Fix the following systemd build failure raised since bump to version
5.0.1 in commit db19998035701d08bf1b5fd366e0b5aa9adb8e57:
../src/lxc/cgroups/cgfsng.c: In function 'unpriv_systemd_create_scope':
../src/lxc/cgroups/cgfsng.c:1234:104: error: incompatible type for argument 10 of 'sd_bus_call_method_asyncv'
r = sd_bus_call_method_asyncv(bus, NULL, DESTINATION, PATH, INTERFACE, "Subscribe", NULL, NULL, NULL, NULL);
^~~~
Fixes:
- https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261449
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...thod_async-to-replace-the-asyncv-one.patch | 47 +++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 package/lxc/0002-use-sd_bus_call_method_async-to-replace-the-asyncv-one.patch
diff --git a/package/lxc/0002-use-sd_bus_call_method_async-to-replace-the-asyncv-one.patch b/package/lxc/0002-use-sd_bus_call_method_async-to-replace-the-asyncv-one.patch
new file mode 100644
index 0000000000..22013cb363
--- /dev/null
+++ b/package/lxc/0002-use-sd_bus_call_method_async-to-replace-the-asyncv-one.patch
@@ -0,0 +1,47 @@
+From b0abedf60b40adf0f2fb3cf9dfee4bc601f7b39f Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Thu, 25 Aug 2022 05:45:53 -0700
+Subject: [PATCH] use sd_bus_call_method_async to replace the asyncv one
+
+The sd_bus_call_method_asyncv's 10th parameter is of type
+va_list and supplying NULL when invoking it causes compilation
+error. Just replace it with the async one.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[Retrieved from:
+https://github.com/lxc/lxc/commit/b0abedf60b40adf0f2fb3cf9dfee4bc601f7b39f]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ meson.build | 4 ++--
+ src/lxc/cgroups/cgfsng.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 21955a0504..f8bdcf4e83 100644
+--- a/meson.build
++++ b/meson.build
+@@ -295,9 +295,9 @@ if not want_sd_bus.disabled()
+ has_sd_bus = false
+ endif
+
+- if not cc.has_function('sd_bus_call_method_asyncv', prefix: '#include <systemd/sd-bus.h>', dependencies: libsystemd)
++ if not cc.has_function('sd_bus_call_method_async', prefix: '#include <systemd/sd-bus.h>', dependencies: libsystemd)
+ if not sd_bus_optional
+- error('libsystemd misses required sd_bus_call_method_asyncv function')
++ error('libsystemd misses required sd_bus_call_method_async function')
+ endif
+
+ has_sd_bus = false
+diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
+index 8a3615893f..d90e5385e1 100644
+--- a/src/lxc/cgroups/cgfsng.c
++++ b/src/lxc/cgroups/cgfsng.c
+@@ -1232,7 +1232,7 @@ static int unpriv_systemd_create_scope(struct cgroup_ops *ops, struct lxc_conf *
+ if (r < 0)
+ return log_error(SYSTEMD_SCOPE_FAILED, "Failed to connect to user bus: %s", strerror(-r));
+
+- r = sd_bus_call_method_asyncv(bus, NULL, DESTINATION, PATH, INTERFACE, "Subscribe", NULL, NULL, NULL, NULL);
++ r = sd_bus_call_method_async(bus, NULL, DESTINATION, PATH, INTERFACE, "Subscribe", NULL, NULL, NULL);
+ if (r < 0)
+ return log_error(SYSTEMD_SCOPE_FAILED, "Failed to subscribe to signals: %s", strerror(-r));
+
--
2.35.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Buildroot] [PATCH 1/1] package/lxc: fix systemd build
2022-11-11 22:42 [Buildroot] [PATCH 1/1] package/lxc: fix systemd build Fabrice Fontaine
@ 2022-11-11 22:51 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-11 22:51 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Jérôme Pouiller, buildroot
On Fri, 11 Nov 2022 23:42:18 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fix the following systemd build failure raised since bump to version
> 5.0.1 in commit db19998035701d08bf1b5fd366e0b5aa9adb8e57:
>
> ../src/lxc/cgroups/cgfsng.c: In function 'unpriv_systemd_create_scope':
> ../src/lxc/cgroups/cgfsng.c:1234:104: error: incompatible type for argument 10 of 'sd_bus_call_method_asyncv'
> r = sd_bus_call_method_asyncv(bus, NULL, DESTINATION, PATH, INTERFACE, "Subscribe", NULL, NULL, NULL, NULL);
> ^~~~
>
> Fixes:
> - https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261449
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...thod_async-to-replace-the-asyncv-one.patch | 47 +++++++++++++++++++
> 1 file changed, 47 insertions(+)
> create mode 100644 package/lxc/0002-use-sd_bus_call_method_async-to-replace-the-asyncv-one.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-11 22:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-11 22:42 [Buildroot] [PATCH 1/1] package/lxc: fix systemd build Fabrice Fontaine
2022-11-11 22:51 ` Thomas Petazzoni via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.