Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix build error with musl libc.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 12 Jul 2022 12:46:38 +0000 (14:46 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 12 Jul 2022 12:46:38 +0000 (14:46 +0200)
include/smpi/smpi_helpers_internal.h

index 53ca8a7..c089449 100644 (file)
 #include <time.h>
 #endif
 
+#if !defined(SMPI_NO_OVERRIDE_MALLOC) && !defined(__GLIBC__)
+/* For musl libc, <sched.h> must be included before #defining calloc(). Testing if !defined(__GLIBC__) is a bit crude
+ * but I don't know a better way. */
+#include <sched.h>
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif