From c34e1c36ec8cfd0d41ec018a776e7e583c127736 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 11 Apr 2017 04:04:37 +0000 Subject: [PATCH] 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") --- tests/getpid.c | 13 +++++++++++-- tests/getppid.c | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) 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 -- 2.40.0