]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
bits: only build when cpu_set_t is available
authorAlyssa Ross <hi@alyssa.is>
Thu, 1 May 2025 07:58:06 +0000 (09:58 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 5 May 2025 08:43:32 +0000 (10:43 +0200)
Doesn't build on macOS.

Fixes: 6e1301d59 ("text-utils: add bits command")
Signed-off-by: Alyssa Ross <hi@alyssa.is>
configure.ac
meson.build

index 85b64f03be124f265352983f021d2dd1ba05e58a..68a8f54d923ca9e142a2a94f66dcae75bee7a928 100644 (file)
@@ -2319,7 +2319,11 @@ UL_REQUIRES_HAVE([scriptlive], [pty], [openpty function (libutil)])
 AM_CONDITIONAL([BUILD_SCRIPTLIVE], [test "x$build_scriptlive" = xyes])
 
 
-UL_BUILD_INIT([bits], [yes])
+AC_ARG_ENABLE([bits],
+  AS_HELP_STRING([--disable-bits], [do not build bits]),
+  [], [UL_DEFAULT_ENABLE([bits], [check])])
+UL_BUILD_INIT([bits])
+UL_REQUIRES_HAVE([bits], [cpu_set_t], [cpu_set_t type])
 AM_CONDITIONAL([BUILD_BITS], [test "x$build_bits" = xyes])
 
 UL_BUILD_INIT([col], [check])
index 73fc086cc84d8d78319ff587ed847e4b24dfbba0..441dab8a233565e9f857e7d050aa8ba2c9ff7e47 100644 (file)
@@ -1261,7 +1261,7 @@ endif
 
 ############################################################
 
-opt = not get_option('build-bits').disabled()
+opt = not get_option('build-bits').require(have_cpu_set_t).disabled()
 exe = executable(
   'bits',
   bits_sources,