瀏覽代碼

* Added ifdefs for HAVE_SYS_PTRACE_H

svn: 1867
Bryan Drewery 21 年之前
父節點
當前提交
5f9b33d8a2
共有 3 個文件被更改,包括 9 次插入5 次删除
  1. 3 1
      src/bg.c
  2. 2 2
      src/shell.c
  3. 4 2
      src/thread.c

+ 3 - 1
src/bg.c

@@ -10,8 +10,10 @@
 #include "thread.h"
 #include "main.h"
 #include <signal.h>
+#ifdef HAVE_SYS_PTRACE_H
+# include <sys/ptrace.h>
+#endif /* HAVE_SYS_PTRACE_H */
 #ifndef CYGWIN_HACKS
-#  include <sys/ptrace.h>
 #  include <sys/wait.h>
 #endif /* !CYGWIN_HACKS */
 #include <sys/types.h>

+ 2 - 2
src/shell.c

@@ -30,9 +30,9 @@
 #include <sys/types.h>
 #include <pwd.h>
 #include <signal.h>
-#ifndef CYGWIN_HACKS
+#ifdef HAVE_SYS_PTRACE_H
 # include <sys/ptrace.h>
-#endif /* !CYGWIN_HACKS */
+#endif /* HAVE_SYS_PTRACE_H */
 #include <sys/wait.h>
 #include <sys/utsname.h>
 #include <pwd.h>

+ 4 - 2
src/thread.c

@@ -3,10 +3,12 @@
  *
  * threads
  */
-
+#include "common.h"
 #include <pthread.h>
 #include <stdio.h>
-#include <sys/ptrace.h>
+#ifdef HAVE_SYS_PTRACE_H
+# include <sys/ptrace.h>
+#endif /* HAVE_SYS_PTRACE_H */
 #include <sys/wait.h>
 #include <sys/types.h>
 #include <errno.h>