diff --git a/runtime/starpu/control/runtime_control.c b/runtime/starpu/control/runtime_control.c
index 7ff77fb499c71aa347c90e0532751d30f6c1c9d0..e1a05a8abde697f778751f76a3c77d0638c953c5 100644
--- a/runtime/starpu/control/runtime_control.c
+++ b/runtime/starpu/control/runtime_control.c
@@ -103,7 +103,11 @@ int RUNTIME_init_scheduler( MORSE_context_t *morse, int ncpus, int ncudas, int n
     }
 
 #ifdef CHAMELEON_USE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS
-    starpu_malloc_on_node_set_default_flags(STARPU_MAIN_RAM, STARPU_MALLOC_PINNED | STARPU_MALLOC_COUNT | STARPU_MALLOC_SIMULATION_FOLDED);
+    starpu_malloc_on_node_set_default_flags(STARPU_MAIN_RAM, STARPU_MALLOC_PINNED | STARPU_MALLOC_COUNT
+#ifdef STARPU_MALLOC_SIMULATION_FOLDED
+            | STARPU_MALLOC_SIMULATION_FOLDED
+#endif
+            );
 #endif
 
 #if defined(CHAMELEON_USE_MPI)