]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: gate lscpu on LINUX and cpu_set_t
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 29 Apr 2026 11:37:45 +0000 (13:37 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Thu, 14 May 2026 11:19:28 +0000 (13:19 +0200)
This tool uses Linux-specific API and cpu_set_t,
encode this in the build system.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
meson.build

index 6326295ded51a4dfd84a3cce298b7e3b5162f097..d67fec2f36b4e3c713cbe6c1a895144621fdcd6b 100644 (file)
@@ -2046,7 +2046,10 @@ if opt and not is_disabler(exe)
   bashcompletions += ['swapoff']
 endif
 
-opt = get_option('build-lscpu').allowed()
+opt = get_option('build-lscpu') \
+      .require(LINUX) \
+      .require(conf.get('HAVE_CPU_SET_T').to_string() == '1') \
+      .allowed()
 exe = executable(
   'lscpu',
   lscpu_sources,