Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/curl/, net-misc/curl/files/
Date: Sun, 03 Jul 2022 02:36:25
Message-Id: 1656815760.ad4a8aa185ee5c83bb775f398b93da9faf4431c6.dilfridge@gentoo
1 commit: ad4a8aa185ee5c83bb775f398b93da9faf4431c6
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 3 02:34:00 2022 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 3 02:36:00 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad4a8aa1
7
8 net-misc/curl: Add build fix for e.g. gcc-12/riscv
9
10 Patch comes from upstream master
11
12 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
13
14 net-misc/curl/curl-7.84.0.ebuild | 1 +
15 net-misc/curl/files/curl-7.84.0-easylock.patch | 30 ++++++++++++++++++++++++++
16 2 files changed, 31 insertions(+)
17
18 diff --git a/net-misc/curl/curl-7.84.0.ebuild b/net-misc/curl/curl-7.84.0.ebuild
19 index c55c9520aa81..645a223aed8f 100644
20 --- a/net-misc/curl/curl-7.84.0.ebuild
21 +++ b/net-misc/curl/curl-7.84.0.ebuild
22 @@ -95,6 +95,7 @@ MULTILIB_CHOST_TOOLS=(
23
24 PATCHES=(
25 "${FILESDIR}"/${PN}-7.30.0-prefix.patch
26 + "${FILESDIR}"/${PN}-7.84.0-easylock.patch
27 "${FILESDIR}"/${PN}-respect-cflags-3.patch
28 "${FILESDIR}"/${PN}-7.84.0-include-sched.patch
29 )
30
31 diff --git a/net-misc/curl/files/curl-7.84.0-easylock.patch b/net-misc/curl/files/curl-7.84.0-easylock.patch
32 new file mode 100644
33 index 000000000000..77ee610fc117
34 --- /dev/null
35 +++ b/net-misc/curl/files/curl-7.84.0-easylock.patch
36 @@ -0,0 +1,30 @@
37 +From 50efb0822aa0e0ab165158dd0a26e65a2290e6d2 Mon Sep 17 00:00:00 2001
38 +From: Daniel Stenberg <daniel@××××.se>
39 +Date: Tue, 28 Jun 2022 09:00:25 +0200
40 +Subject: [PATCH] easy_lock: switch to using atomic_int instead of bool
41 +
42 +To work with more compilers without requiring separate libs to
43 +link. Like with gcc-12 for RISC-V on Linux.
44 +
45 +Reported-by: Adam Sampson
46 +Fixes #9055
47 +Closes #9061
48 +---
49 + lib/easy_lock.h | 4 ++--
50 + 1 file changed, 2 insertions(+), 2 deletions(-)
51 +
52 +diff --git a/lib/easy_lock.h b/lib/easy_lock.h
53 +index 07c85c5ffdd19..9c11bc50c5f20 100644
54 +--- a/lib/easy_lock.h
55 ++++ b/lib/easy_lock.h
56 +@@ -40,8 +40,8 @@
57 + #include <sched.h>
58 + #endif
59 +
60 +-#define curl_simple_lock atomic_bool
61 +-#define CURL_SIMPLE_LOCK_INIT false
62 ++#define curl_simple_lock atomic_int
63 ++#define CURL_SIMPLE_LOCK_INIT 0
64 +
65 + static inline void curl_simple_lock_lock(curl_simple_lock *lock)
66 + {