meson: rename HAVE_SYSTEMD_DAEMON to HAVE_SYSTEMD

This variable describes whether we have systemd and libsystemd,
not just <systemd/sd-daemon.h>

While at it, sneak in a fix for the warning message:
"systemd should never ever be capitalized".

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
This commit is contained in:
Sergey Bugaev 2020-11-05 14:16:04 +03:00 committed by Wim Taymans
parent 1507f40eb0
commit 28af82e6d9
3 changed files with 6 additions and 6 deletions

View file

@ -320,8 +320,8 @@
/* Define to 1 if you have the <winsock2.h> header file. */ /* Define to 1 if you have the <winsock2.h> header file. */
#mesondefine HAVE_WINSOCK2_H #mesondefine HAVE_WINSOCK2_H
/* for the systemd header files */ /* For libsystemd */
#mesondefine HAVE_SYSTEMD_DAEMON #mesondefine HAVE_SYSTEMD
/* Define to 1 if native HSP backend is enabled in bluez5 plugin. */ /* Define to 1 if native HSP backend is enabled in bluez5 plugin. */
#mesondefine HAVE_BLUEZ_5_BACKEND_NATIVE #mesondefine HAVE_BLUEZ_5_BACKEND_NATIVE

View file

@ -279,9 +279,9 @@ if get_option('systemd')
systemd = dependency('systemd', required: false) systemd = dependency('systemd', required: false)
systemd_dep = dependency('libsystemd', required: false) systemd_dep = dependency('libsystemd', required: false)
if systemd.found() and systemd_dep.found() if systemd.found() and systemd_dep.found()
cdata.set('HAVE_SYSTEMD_DAEMON', 1) cdata.set('HAVE_SYSTEMD', 1)
else else
warning('Systemd integration was enabled, but systemd is not available') warning('systemd integration was enabled, but systemd is not available')
endif endif
endif endif

View file

@ -40,7 +40,7 @@
#include <spa/pod/iter.h> #include <spa/pod/iter.h>
#include <spa/utils/result.h> #include <spa/utils/result.h>
#ifdef HAVE_SYSTEMD_DAEMON #ifdef HAVE_SYSTEMD
#include <systemd/sd-daemon.h> #include <systemd/sd-daemon.h>
#endif #endif
@ -576,7 +576,7 @@ static int add_socket(struct pw_protocol *protocol, struct server *s)
int fd = -1, res; int fd = -1, res;
bool activated = false; bool activated = false;
#ifdef HAVE_SYSTEMD_DAEMON #ifdef HAVE_SYSTEMD
{ {
int i, n = sd_listen_fds(0); int i, n = sd_listen_fds(0);
for (i = 0; i < n; ++i) { for (i = 0; i < n; ++i) {