commit:     5bfb0efe34be9619ed955caf09989c908e41fa8a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  1 08:01:13 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan  1 08:01:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bfb0efe

net-libs/ngtcp2: fix build of tests w/ c23

Same as in a7dfda3569459f3ea16b905260e22a3115bfc595 for nghttp2.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../ngtcp2/files/ngtcp2-1.10.0-munit-c23.patch     | 28 ++++++++++++++++++++++
 net-libs/ngtcp2/ngtcp2-1.10.0.ebuild               |  6 ++++-
 net-libs/ngtcp2/ngtcp2-9999.ebuild                 |  6 ++++-
 3 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/net-libs/ngtcp2/files/ngtcp2-1.10.0-munit-c23.patch 
b/net-libs/ngtcp2/files/ngtcp2-1.10.0-munit-c23.patch
new file mode 100644
index 000000000000..93d208fa4215
--- /dev/null
+++ b/net-libs/ngtcp2/files/ngtcp2-1.10.0-munit-c23.patch
@@ -0,0 +1,28 @@
+https://github.com/nemequ/munit/pull/105
+--- a/tests/munit/munit.c
++++ b/tests/munit/munit.c
+@@ -858,23 +858,18 @@ static psnip_uint64_t munit_clock_get_elapsed(struct 
PsnipClockTimespec *start,
+ 
+ #if defined(_OPENMP)
+ #  define ATOMIC_UINT32_T uint32_t
+-#  define ATOMIC_UINT32_INIT(x) (x)
+ #elif defined(HAVE_STDATOMIC)
+ #  include <stdatomic.h>
+ #  define ATOMIC_UINT32_T _Atomic uint32_t
+-#  define ATOMIC_UINT32_INIT(x) ATOMIC_VAR_INIT(x)
+ #elif defined(HAVE_CLANG_ATOMICS)
+ #  define ATOMIC_UINT32_T _Atomic uint32_t
+-#  define ATOMIC_UINT32_INIT(x) (x)
+ #elif defined(_WIN32)
+ #  define ATOMIC_UINT32_T volatile LONG
+-#  define ATOMIC_UINT32_INIT(x) (x)
+ #else
+ #  define ATOMIC_UINT32_T volatile uint32_t
+-#  define ATOMIC_UINT32_INIT(x) (x)
+ #endif
+ 
+-static ATOMIC_UINT32_T munit_rand_state = ATOMIC_UINT32_INIT(42);
++static ATOMIC_UINT32_T munit_rand_state = 42;
+ 
+ #if defined(_OPENMP)
+ static inline void munit_atomic_store(ATOMIC_UINT32_T *dest,

diff --git a/net-libs/ngtcp2/ngtcp2-1.10.0.ebuild 
b/net-libs/ngtcp2/ngtcp2-1.10.0.ebuild
index 789b94518acb..6e826067b4dc 100644
--- a/net-libs/ngtcp2/ngtcp2-1.10.0.ebuild
+++ b/net-libs/ngtcp2/ngtcp2-1.10.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -33,6 +33,10 @@ DEPEND="${RDEPEND}
        test? ( >=dev-util/cunit-2.1[${MULTILIB_USEDEP}] )"
 RESTRICT="!test? ( test )"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.10.0-munit-c23.patch
+)
+
 multilib_src_configure() {
        local mycmakeargs=(
                -DENABLE_STATIC_LIB=$(usex static-libs)

diff --git a/net-libs/ngtcp2/ngtcp2-9999.ebuild 
b/net-libs/ngtcp2/ngtcp2-9999.ebuild
index 789b94518acb..6e826067b4dc 100644
--- a/net-libs/ngtcp2/ngtcp2-9999.ebuild
+++ b/net-libs/ngtcp2/ngtcp2-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -33,6 +33,10 @@ DEPEND="${RDEPEND}
        test? ( >=dev-util/cunit-2.1[${MULTILIB_USEDEP}] )"
 RESTRICT="!test? ( test )"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.10.0-munit-c23.patch
+)
+
 multilib_src_configure() {
        local mycmakeargs=(
                -DENABLE_STATIC_LIB=$(usex static-libs)

Reply via email to