]> granicus.if.org Git - strace/commitdiff
tests: fix build on alpha
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 11 Apr 2017 04:04:37 +0000 (04:04 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 11 Apr 2017 04:04:37 +0000 (04:04 +0000)
* 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
tests/getppid.c

index e55004243142d6f961ca19d4aab1e2143e6dfda0..96f2d157ac22d485409afbbb7a38f04853852b28 100644 (file)
@@ -1,8 +1,11 @@
 #include "tests.h"
-#include <stdio.h>
-#include <unistd.h>
 #include <asm/unistd.h>
 
+#ifdef __NR_getpid
+
+# include <stdio.h>
+# include <unistd.h>
+
 int
 main(void)
 {
@@ -10,3 +13,9 @@ main(void)
        puts("+++ exited with 0 +++");
        return 0;
 }
+
+#else
+
+SKIP_MAIN_UNDEFINED("__NR_getpid")
+
+#endif
index e0f6c7b5115ec86dc8eaf55471393caa185243a2..58901fc6e4441883d4f0b9d5c43d10b39e679695 100644 (file)
@@ -1,8 +1,11 @@
 #include "tests.h"
-#include <stdio.h>
-#include <unistd.h>
 #include <asm/unistd.h>
 
+#ifdef __NR_getppid
+
+# include <stdio.h>
+# include <unistd.h>
+
 int
 main(void)
 {
@@ -10,3 +13,9 @@ main(void)
        puts("+++ exited with 0 +++");
        return 0;
 }
+
+#else
+
+SKIP_MAIN_UNDEFINED("__NR_getppid")
+
+#endif