musl: gracefully disable utmp support (#39775)

This commit is contained in:
Yu Watanabe
2025-11-18 03:29:34 +09:00
committed by GitHub
5 changed files with 1 additions and 21 deletions

View File

@@ -1028,7 +1028,6 @@ 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.
@@ -1688,7 +1687,7 @@ foreach tuple : [
['timesyncd'],
['tmpfiles'],
['tpm'],
['utmp'],
['utmp', get_option('libc') != 'musl', 'musl does not support it'],
['userdb'],
['vconsole'],
['xdg-autostart'],

View File

@@ -1,16 +0,0 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include_next <utmpx.h>
#ifndef UTMPX_FILE
#define UTMPX_FILE "/run/utmp"
#endif
#ifndef WTMPX_FILE
#define WTMPX_FILE "/var/log/wtmp"
#endif
#ifndef ACCOUNTING
#define ACCOUNTING 9
#endif

View File

@@ -49,7 +49,6 @@ executables += [
'include_directories' : [libexec_template['include_directories'], include_directories('.')],
'extract' : systemd_logind_extract_sources,
'dependencies' : [
libutmps,
threads,
],
},

View File

@@ -385,7 +385,6 @@ libshared_deps = [threads,
librt,
libseccomp_cflags,
libselinux_cflags,
libutmps,
libxenctrl_cflags,
libxz_cflags,
libzstd_cflags,

View File

@@ -473,7 +473,6 @@ executables += [
test_template + {
'sources' : files('test-utmp.c'),
'conditions' : ['ENABLE_UTMP'],
'dependencies' : libutmps,
},
test_template + {
'sources' : files('test-varlink.c'),