Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
assume mmap is not functional for us on macos>=11 as memory accesses are restricted...
[simgrid.git] / src / smpi / internals / smpi_config.cpp
index 49bd376..4fe4b7a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2008-2023. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
   #undef _GNU_SOURCE
 #endif
 
-#include "smpi_config.hpp"
 #include "include/xbt/config.hpp"
-#include "mc/mc.h"
 #include "private.hpp"
 #include "smpi_coll.hpp"
+#include "smpi_config.hpp"
+#include "src/mc/mc.h"
 #include "xbt/ex.h"
 #include "xbt/parse_units.hpp"
 
 # ifndef MAC_OS_X_VERSION_10_12
 #   define MAC_OS_X_VERSION_10_12 101200
 # endif
+# ifndef __MAC_11_0
+#   define __MAC_11_0 110000
+# endif
 
-constexpr bool HAVE_WORKING_MMAP = (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12);
+constexpr bool HAVE_WORKING_MMAP = ((MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12) && (MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_11_0));
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__sun) || defined(__HAIKU__) || defined(__MUSL__)
 constexpr bool HAVE_WORKING_MMAP = false;
 #else