meson: switch code dependency to libsystemd

For a while now systemd has packaged a separate `libsystemd`.  For
meson dependency, `systemd` should be used when looking for systemd
service file paths and `libsystemd` should be used for `sd_*` functions.

Update the dependency accordingly.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie797742655ef9af8c93edd279cc162b842a711a2
diff --git a/meson.build b/meson.build
index 65e5b54..4984d1a 100644
--- a/meson.build
+++ b/meson.build
@@ -257,10 +257,11 @@
 bmcweb_dependencies += tinyxml
 
 systemd = dependency('systemd')
-add_project_arguments('-DSYSTEMD_VERSION=' + systemd.version(), language: 'cpp')
+libsystemd = dependency('libsystemd')
+add_project_arguments('-DLIBSYSTEMD_VERSION=' + libsystemd.version(), language: 'cpp')
 
 zlib = dependency('zlib')
-bmcweb_dependencies += [systemd, zlib]
+bmcweb_dependencies += [libsystemd, zlib]
 
 nlohmann_json_dep = dependency(
     'nlohmann_json',
diff --git a/redfish-core/lib/manager_logservices_journal.hpp b/redfish-core/lib/manager_logservices_journal.hpp
index 94ade20..17fb95b 100644
--- a/redfish-core/lib/manager_logservices_journal.hpp
+++ b/redfish-core/lib/manager_logservices_journal.hpp
@@ -429,7 +429,7 @@
 
     // Get the last sequence number
     uint64_t endSeqNum = 0;
-#if SYSTEMD_VERSION >= 254
+#if LIBSYSTEMD_VERSION >= 254
     {
         if (sd_journal_get_seqnum(journal.get(), &endSeqNum, nullptr) < 0)
         {
@@ -455,7 +455,7 @@
 
     // Get the first sequence number
     uint64_t startSeqNum = 0;
-#if SYSTEMD_VERSION >= 254
+#if LIBSYSTEMD_VERSION >= 254
     {
         if (sd_journal_get_seqnum(journal.get(), &startSeqNum, nullptr) < 0)
         {
@@ -500,7 +500,7 @@
         }
 
         uint64_t endChunkSeqNum = 0;
-#if SYSTEMD_VERSION >= 254
+#if LIBSYSTEMD_VERSION >= 254
         {
             if (sd_journal_get_seqnum(journal.get(), &endChunkSeqNum, nullptr) <
                 0)
@@ -525,7 +525,7 @@
             return;
         }
         uint64_t startChunkSeqNum = 0;
-#if SYSTEMD_VERSION >= 254
+#if LIBSYSTEMD_VERSION >= 254
         {
             if (sd_journal_get_seqnum(journal.get(), &startChunkSeqNum,
                                       nullptr) < 0)