Musl's uses calloc() which is marked as poisoned by GCC's "system.h". Work around that by making sure that gets included first. --- gcc-13.2.0/gcc/ada/adaint.c +++ gcc-13.2.0.musl/gcc/ada/adaint.c @@ -101,6 +101,10 @@ #include #endif +#if defined (__linux__) +#include +#endif + #ifdef IN_RTS #ifdef STANDALONE @@ -3441,7 +3445,6 @@ #endif #if defined (__linux__) -#include /* glibc versions earlier than 2.7 do not define the routines to handle dynamically allocated CPU sets. For these targets, we use the static --- gcc-14-20240211/gcc/ada/argv.c +++ gcc-14-20240211.musl/gcc/ada/argv.c @@ -51,10 +51,6 @@ #include "system.h" #endif -#ifndef LIGHT_RUNTIME -#include "adaint.h" -#endif - #ifdef __cplusplus extern "C" { #endif --- gcc-13.2.0/gcc/ada/cio.c +++ gcc-13.2.0.musl/gcc/ada/cio.c @@ -29,6 +29,8 @@ * * ****************************************************************************/ +#include "adaint.h" + #ifdef IN_RTS #include "runtime.h" #include @@ -36,8 +38,6 @@ #include "config.h" #include "system.h" #endif - -#include "adaint.h" /* We need L_tmpnam definition */ #include --- gcc-13.2.0/gcc/ada/cstreams.c +++ gcc-13.2.0.musl/gcc/ada/cstreams.c @@ -58,14 +58,14 @@ #include "vxWorks.h" #endif +#include "adaint.h" + #ifdef IN_RTS #include #else #include "config.h" #include "system.h" #endif - -#include "adaint.h" #ifdef __cplusplus extern "C" { --- gcc-13.2.0/gcc/ada/init.c +++ gcc-13.2.0.musl/gcc/ada/init.c @@ -53,6 +53,8 @@ #undef __linux__ #endif +#include "adaint.h" + #ifdef IN_RTS #ifdef STANDALONE @@ -71,7 +73,6 @@ #include "system.h" #endif -#include "adaint.h" #include "raise.h" #ifdef __cplusplus --- gcc-13.2.0/gcc/ada/raise.c +++ gcc-13.2.0.musl/gcc/ada/raise.c @@ -32,6 +32,8 @@ /* Shared routines to support exception handling. __gnat_unhandled_terminate is shared between all exception handling mechanisms. */ +#include "adaint.h" + #ifdef IN_RTS #include "runtime.h" #else @@ -39,7 +41,6 @@ #include "system.h" #endif -#include "adaint.h" #include "raise.h" #ifdef __cplusplus