From: Alyssa Ross Date: Thu, 1 May 2025 07:58:06 +0000 (+0200) Subject: bits: only build when cpu_set_t is available X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=45f943a4b36f59814cf5a735e4975f2252afac26;p=thirdparty%2Futil-linux.git bits: only build when cpu_set_t is available Doesn't build on macOS. Fixes: 6e1301d59 ("text-utils: add bits command") Signed-off-by: Alyssa Ross --- diff --git a/configure.ac b/configure.ac index 85b64f03b..68a8f54d9 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/meson.build b/meson.build index 73fc086cc..441dab8a2 100644 --- a/meson.build +++ b/meson.build @@ -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,