gentoo-ebuilds/dev-perl/Bit-Vector/files/Bit-Vector-7.400.0-c23.patch
Sam James 10708b8f34
dev-perl/Bit-Vector: fix build w/ C23
Closes: https://bugs.gentoo.org/944355
Signed-off-by: Sam James <sam@gentoo.org>
2025-05-26 09:06:02 +01:00

28 lines
712 B
Diff

https://bugs.gentoo.org/944355
https://rt.cpan.org/Public/Bug/Display.html?id=165142
--- a/ToolBox.h
+++ b/ToolBox.h
@@ -93,10 +93,19 @@ typedef Z_longword *Z_longwordp
#elif PERL_DARWIN
#define boolean bool
#else
- typedef int boolean;
- #ifndef I_STDBOOL
- enum { false, true };
- #endif
+ typedef int boolean;
+ #ifndef I_STDBOOL
+ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #include <stdbool.h>
+ #else
+ #ifndef false
+ #define false 0
+ #endif
+ #ifndef true
+ #define true 1
+ #endif
+ #endif
+ #endif
#endif
#endif