Changeset View
Changeset View
Standalone View
Standalone View
graphics/wayland/files/patch-tests_test-runner.c
--- tests/test-runner.c.orig 2019-03-21 00:55:25 UTC | --- tests/test-runner.c.orig 2020-02-11 23:46:03 UTC | ||||
+++ tests/test-runner.c | +++ tests/test-runner.c | ||||
@@ -25,6 +25,12 @@ | @@ -25,6 +25,12 @@ | ||||
#define _GNU_SOURCE | #define _GNU_SOURCE | ||||
+#include "../config.h" | +#include "../config.h" | ||||
+ | + | ||||
+#ifdef HAVE_SYS_PARAM_H | +#ifdef HAVE_SYS_PARAM_H | ||||
▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | |||||
@@ -336,7 +361,8 @@ int main(int argc, char *argv[]) | @@ -336,7 +361,8 @@ int main(int argc, char *argv[]) | ||||
if (pid == 0) | if (pid == 0) | ||||
run_test(t); /* never returns */ | run_test(t); /* never returns */ | ||||
- if (waitid(P_PID, pid, &info, WEXITED)) { | - if (waitid(P_PID, pid, &info, WEXITED)) { | ||||
+#ifdef HAVE_WAITID | +#ifdef HAVE_WAITID | ||||
+ if (waitid(P_PID, 0, &info, WEXITED)) { | + if (waitid(P_PID, 0, &info, WEXITED)) { | ||||
stderr_set_color(RED); | stderr_set_color(RED); | ||||
fprintf(stderr, "waitid failed: %m\n"); | fprintf(stderr, "waitid failed: %s\n", | ||||
stderr_reset_color(); | strerror(errno)); | ||||
@@ -367,6 +393,25 @@ int main(int argc, char *argv[]) | @@ -368,6 +394,25 @@ int main(int argc, char *argv[]) | ||||
break; | break; | ||||
} | } | ||||
+#else | +#else | ||||
+ if (waitpid(-1, &status, 0) == -1) { | + if (waitpid(-1, &status, 0) == -1) { | ||||
+ fprintf(stderr, "waitpid failed: %s\n", | + fprintf(stderr, "waitpid failed: %s\n", | ||||
+ strerror(errno)); | + strerror(errno)); | ||||
+ abort(); | + abort(); | ||||
Show All 17 Lines |