mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
musl: meson: add libutmps support
musl only provides fake functions, hence even with -Dutmp=true, utmp/wtmp functionalities do not work. Let's allow to build with libutmps.
This commit is contained in:
@@ -1028,6 +1028,7 @@ threads = dependency('threads')
|
||||
librt = cc.find_library('rt')
|
||||
libm = cc.find_library('m')
|
||||
libdl = cc.find_library('dl')
|
||||
libutmps = dependency('libutmps', required : false)
|
||||
|
||||
# On some distributions that use musl (e.g. Alpine), libintl.h may be provided by gettext rather than musl.
|
||||
# In that case, we need to explicitly link with libintl.so.
|
||||
|
||||
@@ -49,6 +49,7 @@ executables += [
|
||||
'include_directories' : [libexec_template['include_directories'], include_directories('.')],
|
||||
'extract' : systemd_logind_extract_sources,
|
||||
'dependencies' : [
|
||||
libutmps,
|
||||
threads,
|
||||
],
|
||||
},
|
||||
|
||||
@@ -385,6 +385,7 @@ libshared_deps = [threads,
|
||||
librt,
|
||||
libseccomp_cflags,
|
||||
libselinux_cflags,
|
||||
libutmps,
|
||||
libxenctrl_cflags,
|
||||
libxz_cflags,
|
||||
libzstd_cflags,
|
||||
|
||||
@@ -472,6 +472,7 @@ executables += [
|
||||
test_template + {
|
||||
'sources' : files('test-utmp.c'),
|
||||
'conditions' : ['ENABLE_UTMP'],
|
||||
'dependencies' : libutmps,
|
||||
},
|
||||
test_template + {
|
||||
'sources' : files('test-varlink.c'),
|
||||
|
||||
Reference in New Issue
Block a user