Restore the stdbool.h meaning of bool after including altivec.h. FSF GCC's altivec.h does "#define bool __bool" (the vector-bool contextual keyword), poisoning every subsequent declaration that uses bool, e.g. SDL_utils_c.h:82 when building SDL_blit_N.c with -maltivec: error: incompatible types when returning type 'int' but '__vector __bool int' was expected SDL_blit_N.c only uses the vector/pixel contextual keywords, never vector bool or vector pixel, so dropping the bool macro is safe. This mirrors what SDL2's SDL_cpuinfo.h did (#undef bool after altivec.h), adapted for SDL3 where bool must keep working afterwards. --- include/SDL3/SDL_intrin.h +++ include/SDL3/SDL_intrin.h @@ -243,6 +243,16 @@ #if defined(__ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC) #define SDL_ALTIVEC_INTRINSICS 1 #include +/* With FSF GCC, altivec.h redefines bool as the AltiVec vector-bool keyword, + which breaks every later declaration using the stdbool.h bool. SDL's + AltiVec code only needs the vector/pixel contextual keywords, so restore + the standard meaning of bool. */ +#ifndef __APPLE_ALTIVEC__ +#undef bool +#ifndef __cplusplus +#define bool _Bool +#endif +#endif #endif #ifndef SDL_DISABLE_NEON # ifdef __ARM_NEON