| Musl's <sched.h> uses calloc() which is marked as poisoned by GCC's |
| "system.h". Work around that by making sure that <sched.h> 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 <sys/time.h> |
| #endif |
| |
| +#if defined (__linux__) |
| +#include <sched.h> |
| +#endif |
| + |
| #ifdef IN_RTS |
| |
| #ifdef STANDALONE |
| @@ -3441,7 +3445,6 @@ |
| #endif |
| |
| #if defined (__linux__) |
| -#include <sched.h> |
| |
| /* 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-13.2.0/gcc/ada/argv.c |
| +++ gcc-13.2.0.musl/gcc/ada/argv.c |
| @@ -42,6 +42,8 @@ |
| main program, and these routines are accessed from the |
| Ada.Command_Line.Environment package. */ |
| |
| +#include "adaint.h" |
| + |
| #ifdef IN_RTS |
| #include "runtime.h" |
| #include <stdlib.h> |
| @@ -50,8 +52,6 @@ |
| #include "config.h" |
| #include "system.h" |
| #endif |
| - |
| -#include "adaint.h" |
| |
| #ifdef __cplusplus |
| extern "C" { |
| --- 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 <sys/stat.h> |
| @@ -36,8 +38,6 @@ |
| #include "config.h" |
| #include "system.h" |
| #endif |
| - |
| -#include "adaint.h" |
| |
| /* We need L_tmpnam definition */ |
| #include <stdio.h> |
| --- 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 <string.h> |
| #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 |