diff --git a/tests/api.c b/tests/api.c index f12ab0bba..e95d014b3 100644 --- a/tests/api.c +++ b/tests/api.c @@ -54,6 +54,7 @@ #ifdef __linux__ #include +#include #endif #include /* compatibility layer */ @@ -33180,6 +33181,7 @@ static int test_wolfSSL_RAND_poll(void) { /* Parent process. */ word64 childrand64 = 0; + int waitstatus = 0; close(pipefds[1]); ExpectIntEQ(RAND_poll(), 1); @@ -33187,6 +33189,7 @@ static int test_wolfSSL_RAND_poll(void) ExpectIntEQ(read(pipefds[0], &childrand64, sizeof(childrand64)), sizeof(childrand64)); ExpectBufNE(randbuf, &childrand64, sizeof(randbuf)); close(pipefds[0]); + waitpid(pid, &waitstatus, 0); } RAND_cleanup();