Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix build of MC after the recent changes
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 12 Dec 2015 23:40:06 +0000 (00:40 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 12 Dec 2015 23:40:06 +0000 (00:40 +0100)
src/mc/mc_protocol.cpp
src/simix/UContext.cpp
src/simix/libsmx.cpp
src/simix/smx_context.cpp

index ce70fab..29fd979 100644 (file)
@@ -7,6 +7,7 @@
 #include <errno.h>
 #include <string.h>
 #include <stdio.h> // perror
+#include <cstddef> // std::size_t
 
 #include <sys/types.h>
 #include <sys/socket.h>
index 6014eca..c453e73 100644 (file)
@@ -232,7 +232,7 @@ UContext::UContext(std::function<void()> code,
 
 #ifdef HAVE_MC
   if (MC_is_active() && code) {
-    MC_register_stack_area(this->stack_, context->process,
+    MC_register_stack_area(this->stack_, process,
                       &(this->uc_), smx_context_usable_stack_size);
   }
 #endif
index 6abcebd..1dbcd20 100644 (file)
@@ -1410,7 +1410,7 @@ void *simcall_mc_snapshot(void) {
 }
 
 int simcall_mc_compare_snapshots(void *s1, void *s2) {
-  return simcall_BODY_mc_compare_snapshots(s1, s2);
+  return simcall_BODY_mc_compare_snapshots((simgrid::mc::Snapshot*)s1, (simgrid::mc::Snapshot*)s2);
 }
 
 #endif /* HAVE_MC */
index bacb466..4a9c6ae 100644 (file)
@@ -141,7 +141,7 @@ void *SIMIX_context_stack_new(void)
 #ifdef HAVE_MC
     /* Cannot use posix_memalign when HAVE_MC. Align stack by hand, and save the
      * pointer returned by xbt_malloc0. */
-    char *alloc = xbt_malloc0(size + xbt_pagesize);
+    char *alloc = (char*)xbt_malloc0(size + xbt_pagesize);
     stack = alloc - ((uintptr_t)alloc & (xbt_pagesize - 1)) + xbt_pagesize;
     *((void **)stack - 1) = alloc;
 #elif !defined(_XBT_WIN32)