Fix build breakage from my previous commit.
Now I test for PT_SETOPTIONS being #defined.
Remove trailing whitespace.
No actual code changes.
diff --git a/strace.c b/strace.c
index 5f50760..4783453 100644
--- a/strace.c
+++ b/strace.c
@@ -2408,7 +2408,9 @@
return -1;
}
}
-#ifdef LINUX /* add more OSes after you verified it works for them */
+/* PTRACE_SETOPTIONS is not a #define. PT_SETOPTIONS is. */
+/* Add more OSes after you verified it works for them. */
+#if defined LINUX && defined PT_SETOPTIONS
/*
* Ask kernel to set signo to SIGTRAP | 0x80
* on ptrace-generated SIGTRAPs, and mark
@@ -2423,7 +2425,7 @@
goto tracing;
}
-#ifdef LINUX
+#if defined LINUX && defined PT_SETOPTIONS
if (tcp->sigtrap80 != SIGTRAP && WSTOPSIG(status) == SIGTRAP) {
/*
* We told ptrace to report SIGTRAP | 0x80 on this process