Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Enable mac compilation with MMAP.
[simgrid.git] / src / xbt / mmalloc / mmap-sup.c
index 46d43e8..f32e0aa 100644 (file)
@@ -9,6 +9,10 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#ifndef MAP_ANONYMOUS
+       #define MAP_ANONYMOUS MAP_ANON
+#endif
+
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>    /* Prototypes for lseek */
 #endif
@@ -38,7 +42,7 @@ extern int getpagesize (void);
 /* Return MAP_PRIVATE if MDP represents /dev/zero.  Otherwise, return
    MAP_SHARED.  */
 
-#define MAP_PRIVATE_OR_SHARED(MDP) ((MDP -> flags & MMALLOC_DEVZERO) \
+#define MAP_PRIVATE_OR_SHARED(MDP) (( MDP -> flags & MMALLOC_ANONYMOUS) \
                                     ? MAP_PRIVATE \
                                     : MAP_SHARED)