mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-17 02:26:34 +02:00
Remove unused custom bool type to fix build error.
```
ninja: job failed: /usr/bin/cc -DUSING_CMAKE -I/home/buildozer/aports/community/blosc/src/c-blosc-1.21.6/build/blosc -I/home/buildozer/aports/community/blosc/src/c-blosc-1.21.6/blosc -Os -fstack-clash-protection -Wformat -Werror=format-security -fvisibility=hidden -Wall -Wwrite-strings -Wno-unused-function -MD -MT blosc/CMakeFiles/blosc_static.dir/shuffle.c.o -MF blosc/CMakeFiles/blosc_static.dir/shuffle.c.o.d -o blosc/CMakeFiles/blosc_static.dir/shuffle.c.o -c /home/buildozer/aports/community/blosc/src/c-blosc-1.21.6/blosc/shuffle.c
/home/buildozer/aports/community/blosc/src/c-blosc-1.21.6/blosc/shuffle.c:26:15: error: 'bool' cannot be defined via 'typedef'
26 | typedef _Bool bool;
| ^~~~
/home/buildozer/aports/community/blosc/src/c-blosc-1.21.6/blosc/shuffle.c:26:15: note: 'bool' is a keyword with '-std=c23' onwards
/home/buildozer/aports/community/blosc/src/c-blosc-1.21.6/blosc/shuffle.c:26:1: warning: useless type name in empty declaration
26 | typedef _Bool bool;
| ^~~~~~~
```
45 lines
1.4 KiB
Diff
45 lines
1.4 KiB
Diff
Patch-Source: 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
|