diff options
author | Will Thompson <will@willthompson.co.uk> | 2021-12-16 21:18:48 +0000 |
---|---|---|
committer | Will Thompson <will@willthompson.co.uk> | 2021-12-16 21:18:48 +0000 |
commit | f18dee1d20f2fb831a9baea462132cb67ee63206 (patch) | |
tree | 7933c07a0a4f20d43064d8398f86608b58f87029 | |
parent | aabf456ee29615b5186f78b627cc05c003b1d4b1 (diff) | |
download | gnome-desktop-f18dee1d20f2fb831a9baea462132cb67ee63206.tar.gz |
systemd: Avoid unused function warning when disabled
If the project is configured to build without systemd support, this
function is unused.
If one is foolish enough to also build with -Werror, as I am, then this
the resulting unused-function warning is fatal and one is sad.
-rw-r--r-- | libgnome-desktop/gnome-systemd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libgnome-desktop/gnome-systemd.c b/libgnome-desktop/gnome-systemd.c index 89e0a423..3773f3ba 100644 --- a/libgnome-desktop/gnome-systemd.c +++ b/libgnome-desktop/gnome-systemd.c @@ -143,6 +143,7 @@ on_bus_gotten_cb (GObject *source, } #endif +#ifdef HAVE_SYSTEMD static gchar * systemd_unit_name_escape (const gchar *in) { @@ -158,6 +159,7 @@ systemd_unit_name_escape (const gchar *in) } return g_string_free (str, FALSE); } +#endif /** * gnome_start_systemd_scope: |