Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix build error with musl libc.
[simgrid.git] / 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