From: Chen Qi Date: Thu, 25 Aug 2022 12:45:53 +0000 (-0700) Subject: use sd_bus_call_method_async to replace the asyncv one X-Git-Tag: lxc-5.0.2~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1a61a5f05332d7a8323d8be50cc88e1310173fd;p=thirdparty%2Flxc.git 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 --- diff --git a/meson.build b/meson.build index 7efcbd2cc..9fefe1642 100644 --- a/meson.build +++ b/meson.build @@ -299,9 +299,9 @@ if not want_sd_bus.disabled() has_sd_bus = false endif - if not cc.has_function('sd_bus_call_method_asyncv', prefix: '#include ', dependencies: libsystemd) + if not cc.has_function('sd_bus_call_method_async', prefix: '#include ', 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 3bd7bd908..9293f6dbd 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));