diff mbox series

[ndctl] build: Fix systemd unit directory detection

Message ID 164680368507.2861995.11649228118524518218.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State Accepted
Commit 2bd51ba943c5cca9a29f320507b4b93a679ad1e3
Headers show
Series [ndctl] build: Fix systemd unit directory detection | expand

Commit Message

Dan Williams March 9, 2022, 5:28 a.m. UTC
Older distributions (like CentOS Stream 8) define the systemd unit
directory variable in pkgconfig as ${systemdsystemunitdir}, instead of
${systemd_system_unit_dir}. Newer systemd pkgconfig uses both. Pick the
older more compatible name for use.

Fixes: 4e5faa1726d2 ("build: Add meson build infrastructure")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 meson.build |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index f25ec6c47e7b..5e97e1ce3068 100644
--- a/meson.build
+++ b/meson.build
@@ -150,7 +150,7 @@  endif
 
 if get_option('systemd').enabled()
   systemd = dependency('systemd', required : true)
-  systemdunitdir = systemd.get_pkgconfig_variable('systemd_system_unit_dir')
+  systemdunitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
   udev = dependency('udev', required : true)
   udevdir = udev.get_pkgconfig_variable('udevdir')
   udevrulesdir = udevdir / 'rules.d'