Files
gentoo/dev-libs/c-blosc/files/c-blosc-1.21.4-c23.patch
Sam James 660bb95850 dev-libs/c-blosc: build fixes
* Fix C23 compat (bool)
* Fix CMake 4 compat

Closes: https://bugs.gentoo.org/946283
Signed-off-by: Sam James <sam@gentoo.org>
2025-05-26 01:32:58 +01:00

47 lines
1.4 KiB
Diff

https://bugs.gentoo.org/946283
https://github.com/Blosc/c-blosc/pull/392
From 774f6a0ebaa0c617f7f13ccf6bc89d17eba04654 Mon Sep 17 00:00:00 2001
From: Georg Semmler <georg.semmler@giga-infosystems.com>
Date: Thu, 17 Apr 2025 10:19:25 +0200
Subject: [PATCH] Drop a slightly outdated type def for boolean type
This cases compilation errors with gcc 15 with the following error
message:
c-blosc/blosc/shuffle.c:26:15: error: 'bool' cannot be defined via 'typedef'
| typedef _Bool bool;
| ^~~~
c-blosc/blosc/shuffle.c:26:15: note: 'bool' is a keyword with '-std=c23' onwards
See https://gcc.gnu.org/gcc-15/porting_to.html for details
I've choosen to remove the typedef as it seems to be unused in this
file.
---
blosc/shuffle.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/blosc/shuffle.c b/blosc/shuffle.c
index e680a173..9e3ee3e3 100644
--- a/blosc/shuffle.c
+++ b/blosc/shuffle.c
@@ -20,16 +20,6 @@
#include <pthread.h>
#endif
-/* Visual Studio < 2013 does not have stdbool.h so here it is a replacement: */
-#if defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
-/* have a C99 compiler */
-typedef _Bool bool;
-#else
-/* do not have a C99 compiler */
-typedef unsigned char bool;
-#endif
-
-
#if !defined(__clang__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && \
__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
#define HAVE_CPU_FEAT_INTRIN