]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dbus-execute: define bus_set_transient_errno() only if HAVE_SECCOMP (#7869)
author0xAX <0xAX@users.noreply.github.com>
Fri, 12 Jan 2018 23:48:53 +0000 (00:48 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 12 Jan 2018 23:48:53 +0000 (08:48 +0900)
in other way we will get a warning during build:

../src/core/dbus-util.h:55:13: warning: ‘bus_set_transient_errno’
defined but not used [-Wunused-function]

    int bus_set_transient_##function(

src/core/dbus-execute.c

index 352852a75ed0838bee36894fabf47015b3d18bd6..628fdcd1e5bbf15996db0b1b7910c0ddb2aaa2a4 100644 (file)
@@ -1174,7 +1174,9 @@ static const char* mount_propagation_flags_to_string_with_check(unsigned long n)
 
 static BUS_DEFINE_SET_TRANSIENT(nsec, "t", uint64_t, nsec_t, NSEC_FMT);
 static BUS_DEFINE_SET_TRANSIENT_IS_VALID(log_level, "i", int32_t, int, "%" PRIi32, log_level_is_valid);
+#if HAVE_SECCOMP
 static BUS_DEFINE_SET_TRANSIENT_IS_VALID(errno, "i", int32_t, int, "%" PRIi32, errno_is_valid);
+#endif
 static BUS_DEFINE_SET_TRANSIENT_IS_VALID(sched_priority, "i", int32_t, int, "%" PRIi32, sched_priority_is_valid);
 static BUS_DEFINE_SET_TRANSIENT_IS_VALID(nice, "i", int32_t, int, "%" PRIi32, nice_is_valid);
 static BUS_DEFINE_SET_TRANSIENT_PARSE(std_input, ExecInput, exec_input_from_string);