From: Dmitry V. Levin Date: Tue, 11 Apr 2017 04:04:37 +0000 (+0000) Subject: tests: fix build on alpha X-Git-Tag: v4.17~116 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c34e1c36ec8cfd0d41ec018a776e7e583c127736;p=strace tests: fix build on alpha * tests/getpid.c: Skip if __NR_getpid is not defined. * tests/getppid.c: Skip if __NR_getppid is not defined. Fixes: fd1041f6 ("tests: add tests for getpid and getppid syscalls") --- diff --git a/tests/getpid.c b/tests/getpid.c index e5500424..96f2d157 100644 --- a/tests/getpid.c +++ b/tests/getpid.c @@ -1,8 +1,11 @@ #include "tests.h" -#include -#include #include +#ifdef __NR_getpid + +# include +# include + int main(void) { @@ -10,3 +13,9 @@ main(void) puts("+++ exited with 0 +++"); return 0; } + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpid") + +#endif diff --git a/tests/getppid.c b/tests/getppid.c index e0f6c7b5..58901fc6 100644 --- a/tests/getppid.c +++ b/tests/getppid.c @@ -1,8 +1,11 @@ #include "tests.h" -#include -#include #include +#ifdef __NR_getppid + +# include +# include + int main(void) { @@ -10,3 +13,9 @@ main(void) puts("+++ exited with 0 +++"); return 0; } + +#else + +SKIP_MAIN_UNDEFINED("__NR_getppid") + +#endif