-#include "xbt/sysdep.h" /* xbt_abort() */
-#include "simgrid_config.h" /* Do we need vasprintf? */
+/* find vasprintf in stdio.h */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+#include <stdio.h>
+
+#include "xbt/sysdep.h" /* xbt_abort() */
+#include "src/internal_config.h" /* Do we need vasprintf? */
+
+#include <assert.h>
#include <stdarg.h> /* vsnprintf */
int vasprintf(char **ptr, const char *fmt, va_list ap);
int vasprintf(char **ptr, const char *fmt, va_list ap)
#include <stdarg.h> /* vsnprintf */
int vasprintf(char **ptr, const char *fmt, va_list ap);
int vasprintf(char **ptr, const char *fmt, va_list ap)
if (vasprintf(&res, fmt, ap) < 0) {
/* Do not want to use xbt_die() here, as it uses the logging
if (vasprintf(&res, fmt, ap) < 0) {
/* Do not want to use xbt_die() here, as it uses the logging