summaryrefslogtreecommitdiff
path: root/tests/leak_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/leak_test.cpp')
-rw-r--r--tests/leak_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/leak_test.cpp b/tests/leak_test.cpp
index 4ebf41f59..80618e503 100644
--- a/tests/leak_test.cpp
+++ b/tests/leak_test.cpp
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <string.h>
#include <sys/mman.h>
+#include <sys/syscall.h>
#include <sys/user.h>
#include <unistd.h>
@@ -44,7 +45,7 @@ static void WaitUntilAllThreadsExited(pid_t* tids, size_t tid_count) {
alive = false;
for (size_t i = 0; i < tid_count; ++i) {
if (tids[i] != 0) {
- if (tgkill(getpid(), tids[i], 0) == 0) {
+ if (syscall(__NR_tgkill, getpid(), tids[i], 0) == 0) {
alive = true;
} else {
EXPECT_EQ(errno, ESRCH);