diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2024-01-10 17:12:18 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2024-01-10 22:10:14 +0100 |
commit | e59176f23cfdf40fe078e55835d61464f80d092b (patch) | |
tree | ab4a9132a186d2bf7256a6146d6416552b4eb070 | |
parent | 2a58f5dba8fcbcfea3140e08af43095b96042c9b (diff) |
Fix static linking with libsystemd
libsystemd requires libcap for static linking.
Add missing macro for function alias.
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | linux/SystemdMeter.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index fe7f7b39..8de3c1dd 100644 --- a/configure.ac +++ b/configure.ac @@ -336,7 +336,7 @@ if test "$my_htop_platform" = pcp; then fi if test "$my_htop_platform" = linux && test "x$enable_static" = xyes; then - AC_CHECK_LIB([systemd], [sd_bus_open_system]) + AC_CHECK_LIB([systemd], [sd_bus_open_system], [], [], [-lcap]) fi # ---------------------------------------------------------------------- diff --git a/linux/SystemdMeter.c b/linux/SystemdMeter.c index e13c6461..039e578d 100644 --- a/linux/SystemdMeter.c +++ b/linux/SystemdMeter.c @@ -33,6 +33,7 @@ in the source distribution for its full text. #ifdef BUILD_STATIC #define sym_sd_bus_open_system sd_bus_open_system +#define sym_sd_bus_open_user sd_bus_open_user #define sym_sd_bus_get_property_string sd_bus_get_property_string #define sym_sd_bus_get_property_trivial sd_bus_get_property_trivial #define sym_sd_bus_unref sd_bus_unref |