• Andreas Färber's avatar
    arch_init: Fix AltiVec build on Darwin/ppc · f283edc4
    Andreas Färber authored
    Commit f29a5614 (implement
    -no-user-config command-line option (v3)) introduced uses of bool
    in arch_init.c. Shortly before that usage is support code for
    AltiVec (conditional to __ALTIVEC__).
    GCC's altivec.h may in a !__APPLE_ALTIVEC__ code path redefine bool,
    leading to type mismatches. altivec.h recommends to #undef for C++
    compatibility, but doing so in C leads to bool remaining undefined.
    Fix by redefining bool to _Bool as mandated for stdbool.h by POSIX.
    Signed-off-by: default avatarAndreas Färber <andreas.faerber@web.de>
    Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
arch_init.c 18.4 KB