--- a/tests/test-ovn.c
+++ b/tests/test-ovn.c
@@ -1043,7 +1043,7 @@ wait_pid(pid_t *pids, int *n)
     int status;
     pid_t pid;
 
-    pid = waitpid(WAIT_ANY, &status, 0);
+    pid = waitpid(-1, &status, 0);
     if (pid < 0) {
         ovs_fatal(errno, "waitpid failed");
     } else if (WIFEXITED(status)) {
