Files
rpi-buildroot/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
Julien Olivain 8489cb0932 package/util-linux: fix libuuid build without pthread
Since Buildroot commit [1], util-linux libuuid is failing to build
with uclibc toolchains, when there is no thread support
(that is, when BR2_PTHREADS_NONE=y).

Builds are failing with error:

    libuuid/src/gen_uuid.c:83:10: fatal error: pthread.h: No such file or directory
       83 | #include <pthread.h>
          |          ^~~~~~~~~~~

This failure is due to the upstream commit [2], which introduced the
pthread dependency.

This commit fixes the issue by adding package patches, disabling
the uuidd cache in case the libptread (or the pthread_atfork function)
is not available.

Fixes:
https://autobuild.buildroot.org/results/e5856cf6f3b8512ededa17d20db2b330a478dd8e/

[1] f14929c657
[2] 25bd5396ab

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-04 14:14:39 +01:00

28 lines
746 B
Diff

From f540cc6fed7224fb9ca162cb2f33c338260ae1d2 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Mon, 27 Jan 2025 14:11:35 +0100
Subject: [PATCH] meson: add HAVE_LIBPTHREAD
Upstream: https://github.com/util-linux/util-linux/pull/3383
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/meson.build b/meson.build
index 6d1f986af..ac5fdd799 100644
--- a/meson.build
+++ b/meson.build
@@ -748,6 +748,7 @@ endif
conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
thread_libs = dependency('threads')
+conf.set('HAVE_LIBPTHREAD', thread_libs.found() ? 1 : false)
have = cc.has_function('timer_create')
if not have
--
2.48.1