#include <errno.h>
#include <string.h>
#include <stdio.h> // perror
+#include <cstddef> // std::size_t
#include <sys/types.h>
#include <sys/socket.h>
#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
}
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 */
#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)