491271b4fe
Fix the following build failure of gnupg2 raised since bump to version 1.7 in commit3ef4d24192
and https://git.gnupg.org/cgi-bin/gitweb.cgi?p=npth.git;a=commitdiff;h=02ce6b2d27f91ed6285e4e92d99c21bcc7823c9b: /home/autobuild/autobuild/instance-2/output-1/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/13.2.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: /home/autobuild/autobuild/instance-2/output-1/host/bin/../armeb-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libnpth.so: undefined reference to `busy_wait_for' Fixes:3ef4d24192
- http://autobuild.buildroot.org/results/9a27ffde79598a39b4fd55c716978d32d0beb924 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> (cherry picked from commitad64ddd4f3
) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From 75c68399ef3bbb5d024f2a60474a7214fa479016 Mon Sep 17 00:00:00 2001
|
|
From: NIIBE Yutaka <gniibe@fsij.org>
|
|
Date: Mon, 13 May 2024 11:13:23 +0900
|
|
Subject: [PATCH] Fix previous commit.
|
|
|
|
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
|
|
Upstream: https://git.gnupg.org/cgi-bin/gitweb.cgi?p=npth.git;a=commit;h=75c68399ef3bbb5d024f2a60474a7214fa479016
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
---
|
|
src/npth.c | 12 ++++++++++++
|
|
1 file changed, 12 insertions(+)
|
|
|
|
diff --git a/src/npth.c b/src/npth.c
|
|
index f02540c..8dced17 100644
|
|
--- a/src/npth.c
|
|
+++ b/src/npth.c
|
|
@@ -178,6 +178,18 @@ static int initialized_or_any_threads;
|
|
typedef int (*trylock_func_t) (void *);
|
|
|
|
#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
|
|
+#define REQUIRE_THE_BUSY_WAIT_FOR_IMPLEMENTATION 1
|
|
+#endif
|
|
+
|
|
+#if !HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK && HAVE_PTHREAD_RWLOCK_TRYRDLOCK
|
|
+#define REQUIRE_THE_BUSY_WAIT_FOR_IMPLEMENTATION 1
|
|
+#endif
|
|
+
|
|
+#if !HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK && HAVE_PTHREAD_RWLOCK_TRYWRLOCK
|
|
+#define REQUIRE_THE_BUSY_WAIT_FOR_IMPLEMENTATION 1
|
|
+#endif
|
|
+
|
|
+#if REQUIRE_THE_BUSY_WAIT_FOR_IMPLEMENTATION
|
|
static int
|
|
busy_wait_for (trylock_func_t trylock, void *lock,
|
|
const struct timespec *abstime)
|
|
--
|
|
2.30.2
|
|
|