| 1 |
Musl's <sched.h> uses calloc() which is marked as poisoned by GCC's |
| 2 |
"system.h". Work around that by making sure that <sched.h> gets |
| 3 |
included first. |
| 4 |
|
| 5 |
--- gcc-13.2.0/gcc/ada/adaint.c |
| 6 |
+++ gcc-13.2.0.musl/gcc/ada/adaint.c |
| 7 |
@@ -101,6 +101,10 @@ |
| 8 |
#include <sys/time.h> |
| 9 |
#endif |
| 10 |
|
| 11 |
+#if defined (__linux__) |
| 12 |
+#include <sched.h> |
| 13 |
+#endif |
| 14 |
+ |
| 15 |
#ifdef IN_RTS |
| 16 |
|
| 17 |
#ifdef STANDALONE |
| 18 |
@@ -3441,7 +3445,6 @@ |
| 19 |
#endif |
| 20 |
|
| 21 |
#if defined (__linux__) |
| 22 |
-#include <sched.h> |
| 23 |
|
| 24 |
/* glibc versions earlier than 2.7 do not define the routines to handle |
| 25 |
dynamically allocated CPU sets. For these targets, we use the static |
| 26 |
--- gcc-14-20240211/gcc/ada/argv.c |
| 27 |
+++ gcc-14-20240211.musl/gcc/ada/argv.c |
| 28 |
@@ -51,10 +51,6 @@ |
| 29 |
#include "system.h" |
| 30 |
#endif |
| 31 |
|
| 32 |
-#ifndef LIGHT_RUNTIME |
| 33 |
-#include "adaint.h" |
| 34 |
-#endif |
| 35 |
- |
| 36 |
#ifdef __cplusplus |
| 37 |
extern "C" { |
| 38 |
#endif |
| 39 |
--- gcc-13.2.0/gcc/ada/cio.c |
| 40 |
+++ gcc-13.2.0.musl/gcc/ada/cio.c |
| 41 |
@@ -29,6 +29,8 @@ |
| 42 |
* * |
| 43 |
****************************************************************************/ |
| 44 |
|
| 45 |
+#include "adaint.h" |
| 46 |
+ |
| 47 |
#ifdef IN_RTS |
| 48 |
#include "runtime.h" |
| 49 |
#include <sys/stat.h> |
| 50 |
@@ -36,8 +38,6 @@ |
| 51 |
#include "config.h" |
| 52 |
#include "system.h" |
| 53 |
#endif |
| 54 |
- |
| 55 |
-#include "adaint.h" |
| 56 |
|
| 57 |
/* We need L_tmpnam definition */ |
| 58 |
#include <stdio.h> |
| 59 |
--- gcc-13.2.0/gcc/ada/cstreams.c |
| 60 |
+++ gcc-13.2.0.musl/gcc/ada/cstreams.c |
| 61 |
@@ -58,14 +58,14 @@ |
| 62 |
#include "vxWorks.h" |
| 63 |
#endif |
| 64 |
|
| 65 |
+#include "adaint.h" |
| 66 |
+ |
| 67 |
#ifdef IN_RTS |
| 68 |
#include <string.h> |
| 69 |
#else |
| 70 |
#include "config.h" |
| 71 |
#include "system.h" |
| 72 |
#endif |
| 73 |
- |
| 74 |
-#include "adaint.h" |
| 75 |
|
| 76 |
#ifdef __cplusplus |
| 77 |
extern "C" { |
| 78 |
--- gcc-13.2.0/gcc/ada/init.c |
| 79 |
+++ gcc-13.2.0.musl/gcc/ada/init.c |
| 80 |
@@ -53,6 +53,8 @@ |
| 81 |
#undef __linux__ |
| 82 |
#endif |
| 83 |
|
| 84 |
+#include "adaint.h" |
| 85 |
+ |
| 86 |
#ifdef IN_RTS |
| 87 |
|
| 88 |
#ifdef STANDALONE |
| 89 |
@@ -71,7 +73,6 @@ |
| 90 |
#include "system.h" |
| 91 |
#endif |
| 92 |
|
| 93 |
-#include "adaint.h" |
| 94 |
#include "raise.h" |
| 95 |
|
| 96 |
#ifdef __cplusplus |
| 97 |
--- gcc-13.2.0/gcc/ada/raise.c |
| 98 |
+++ gcc-13.2.0.musl/gcc/ada/raise.c |
| 99 |
@@ -32,6 +32,8 @@ |
| 100 |
/* Shared routines to support exception handling. __gnat_unhandled_terminate |
| 101 |
is shared between all exception handling mechanisms. */ |
| 102 |
|
| 103 |
+#include "adaint.h" |
| 104 |
+ |
| 105 |
#ifdef IN_RTS |
| 106 |
#include "runtime.h" |
| 107 |
#else |
| 108 |
@@ -39,7 +41,6 @@ |
| 109 |
#include "system.h" |
| 110 |
#endif |
| 111 |
|
| 112 |
-#include "adaint.h" |
| 113 |
#include "raise.h" |
| 114 |
|
| 115 |
#ifdef __cplusplus |