1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
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-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 <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
|