Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
deal with portability issues induced by ptrace
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 16 Nov 2015 15:04:42 +0000 (16:04 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 16 Nov 2015 15:04:42 +0000 (16:04 +0100)
CMakeLists.txt
src/simix/smx_global.c
tools/cmake/src/internal_config.h.in

index c5a2b3c..dff73aa 100644 (file)
@@ -311,6 +311,7 @@ CHECK_INCLUDE_FILE("valgrind/valgrind.h" HAVE_VALGRIND_VALGRIND_H)
 CHECK_INCLUDE_FILE("socket.h" HAVE_SOCKET_H)
 CHECK_INCLUDE_FILE("stat.h" HAVE_STAT_H)
 CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
+CHECK_INCLUDE_FILE("sys/ptrace.h" HAVE_SYS_PTRACE_H)
 CHECK_INCLUDE_FILE("windows.h" HAVE_WINDOWS_H)
 CHECK_INCLUDE_FILE("errno.h" HAVE_ERRNO_H)
 CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H)
index 36a805e..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"
index 1cd052f..9a41c9e 100644 (file)
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #cmakedefine HAVE_SYS_STAT_H @HAVE_SYS_STAT_H@
 
+/* Define to 1 if you have the <sys/ptrace.h> header file. */
+#cmakedefine HAVE_SYS_PTRACE_H @HAVE_SYS_PTRACE_H@
+
 /* Define to 1 if you have the <sys/time.h> header file. */
 #cmakedefine HAVE_SYS_TIME_H @HAVE_SYS_TIME_H@