]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: fix non threaded toolchains
authorRosen Penev <rosenp@gmail.com>
Sun, 2 Nov 2025 20:25:26 +0000 (12:25 -0800)
committerRosen Penev <rosenp@gmail.com>
Sun, 2 Nov 2025 20:25:26 +0000 (12:25 -0800)
threads needs to be set as not required.

Cleaned up meson build slightly to use one dependency call.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libuuid/meson.build
meson.build

index 5115944adad42f85702822e92fe3588ebba8df87..17b759a0c05376dcafefc2ef37705a77e2f4dc26 100644 (file)
@@ -31,8 +31,6 @@ if cc.has_link_argument('-Wl,--version-script=@0@'.format(libuuid_sym_path))
        libuuid_link_args += ['-Wl,--version-script=@0@'.format(libuuid_sym_path)]
 endif
 
-thread_dep = dependency('threads')
-
 lib_uuid = library(
   'uuid',
   list_h,
@@ -47,7 +45,7 @@ lib_uuid = library(
   link_depends : libuuid_link_depends,
   version : libuuid_version,
   link_args : libuuid_link_args,
-  dependencies : [socket_libs, thread_dep,
+  dependencies : [socket_libs, thread_libs,
                   build_libuuid ? [] : disabler()],
   install : build_libuuid)
 uuid_dep = declare_dependency(link_with: lib_uuid, include_directories: dir_libuuid)
index 66fcbef543ddcb4f7e2da8c804df0e5a436aadb3..7a995d612c2143739806c27a2156cec8e0e3eb85 100644 (file)
@@ -804,7 +804,7 @@ if not have
 endif
 conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
 
-thread_libs = dependency('threads')
+thread_libs = dependency('threads', required: false)
 conf.set('HAVE_LIBPTHREAD', thread_libs.found() ? 1 : false)
 
 have = cc.has_function('timer_create')
@@ -880,7 +880,7 @@ have = cc.has_header_symbol('linux/vm_sockets.h', 'VMADDR_CID_LOCAL',
                             prefix : '#include <sys/socket.h>')
 conf.set('HAVE_DECL_VMADDR_CID_LOCAL', have ? 1 : false)
 
-build_plymouth_support = (not build_plymouth_support.disabled() and 
+build_plymouth_support = (not build_plymouth_support.disabled() and
                           have_tiocglcktrmios and
                           have_sock_cloexec and
                           have_sock_nonblock and