diff --git a/tests/set_ptracer_any.c b/tests/set_ptracer_any.c index 3b4ea2cb..9d206259 100644 --- a/tests/set_ptracer_any.c +++ b/tests/set_ptracer_any.c @@ -37,10 +37,16 @@ int main(int argc, char **argv) { if (argc < 2) return 99; -#if defined HAVE_PRCTL && defined PR_SET_PTRACER && defined PR_SET_PTRACER_ANY - /* Turn off restrictions on tracing if applicable. If the options +#ifdef HAVE_PRCTL + /* Turn off restrictions on tracing if applicable. If the command * aren't available on this system, that's OK too. */ - (void) prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY); +# ifndef PR_SET_PTRACER +# define PR_SET_PTRACER 0x59616d61 +# endif +# ifndef PR_SET_PTRACER_ANY +# define PR_SET_PTRACER_ANY -1UL +# endif + (void) prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0); #endif if (write(1, "\n", 1) != 1) { perror("write");