]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
use sd_bus_call_method_async to replace the asyncv one
authorChen Qi <Qi.Chen@windriver.com>
Thu, 25 Aug 2022 12:45:53 +0000 (05:45 -0700)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 16 Dec 2022 16:34:37 +0000 (11:34 -0500)
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>
meson.build
src/lxc/cgroups/cgfsng.c

index 7efcbd2ccb874a5502db8aabec9b710e2def2846..9fefe1642e2a1420647aacd2b9219f4c8c67d816 100644 (file)
@@ -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 <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
index 3bd7bd9088e241ccd9db209a38f5708d6517768c..9293f6dbd4fc95e37a13e02d12721e06813de113 100644 (file)
@@ -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));