Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
deal with portability issues induced by ptrace
[simgrid.git] / src / simix / smx_global.c
index aae71fa..e1bf5ae 100644 (file)
@@ -5,7 +5,11 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdlib.h>
-#include <sys/ptrace.h>
+#include "src/portable.h"
+#ifdef HAVE_SYS_PTRACE_H
+# include <sys/types.h>
+# include <sys/ptrace.h>
+#endif
 
 #include "smx_private.h"
 #include "xbt/heap.h"
@@ -644,12 +648,12 @@ void SIMIX_display_process_status(void)
         break;
       }
       XBT_INFO("Process %lu (%s@%s): waiting for %s synchro %p (%s) in state %d to finish",
-          process->pid, process->name, sg_host_name(process->host),
+          process->pid, process->name, sg_host_get_name(process->host),
           synchro_description, process->waiting_synchro,
           process->waiting_synchro->name, (int)process->waiting_synchro->state);
     }
     else {
-      XBT_INFO("Process %lu (%s@%s)", process->pid, process->name, sg_host_name(process->host));
+      XBT_INFO("Process %lu (%s@%s)", process->pid, process->name, sg_host_get_name(process->host));
     }
   }
 }