]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
meson: don't pass libsystemd version to C preprocessor
authorVladimír Čunát <vladimir.cunat@nic.cz>
Sat, 25 Jul 2020 14:46:13 +0000 (16:46 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 27 Jul 2020 09:23:35 +0000 (11:23 +0200)
We don't use it anymore, and on some systems it's apparently
not an integer.

NEWS
daemon/main.c
meson.build

diff --git a/NEWS b/NEWS
index 7a7cdce5ece20c3029f30d8d72cdb6916aedaee4..9cef9085ef3d1c507214c73d76b8cc9ed9a8f89c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ Bugfixes
 --------
 - tls: fix compilation to support net.tls_sticket_secret() (!1021)
 - validator: ignore bogus RRSIGs present in insecure domains (!1022, #587)
+- build if libsystemd version isn't detected as integer (#592, !1029)
 
 
 Knot Resolver 5.1.2 (2020-07-01)
index 01eaba92767025a989f663556a28cfcf10e8d061..3295cd0d646aea04e7f9bc7214ea159a1adc2557 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <lua.h>
 #include <uv.h>
-#if SYSTEMD_VERSION > 0
+#if ENABLE_LIBSYSTEMD
 #include <systemd/sd-daemon.h>
 #endif
 #include <libknot/error.h>
@@ -277,7 +277,7 @@ static int run_worker(uv_loop_t *loop, struct engine *engine, fd_array_t *ipc_se
        memcpy(&engine->ipc_set, ipc_set, sizeof(*ipc_set));
 
        /* Notify supervisor. */
-#if SYSTEMD_VERSION > 0
+#if ENABLE_LIBSYSTEMD
        sd_notify(0, "READY=1");
 #endif
        /* Run event loop */
index b3d56e22ddfc6db8e94b91ea9cef7eba2ac8e7fd..6d732e186637de98f4dc63cc63e5c3cc81fec134 100644 (file)
@@ -165,8 +165,7 @@ conf_data.set_quoted('libzscanner_SONAME',
   libzscanner.get_pkgconfig_variable('soname'))
 conf_data.set_quoted('libknot_SONAME',
   libknot.get_pkgconfig_variable('soname'))
-conf_data.set('SYSTEMD_VERSION',
-  libsystemd.found() ? libsystemd.version().to_int() : -1)
+conf_data.set('ENABLE_LIBSYSTEMD', libsystemd.found() ? 1 : 0)
 conf_data.set('NOVERBOSELOG', not verbose_log)
 conf_data.set('ENABLE_SENDMMSG', sendmmsg.to_int())
 conf_data.set('ENABLE_CAP_NG', capng.found())