Fix bug for recursive/errorcheck mutex on 32-bit devices.
Bug: 19216648
Change-Id: I3b43b2d18d25b9bde352da1e35f9568133dec7cf
diff --git a/tests/stack_protector_test.cpp b/tests/stack_protector_test.cpp
index 8007711..22285d1 100644
--- a/tests/stack_protector_test.cpp
+++ b/tests/stack_protector_test.cpp
@@ -24,14 +24,10 @@
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
-#include <sys/syscall.h>
#include <unistd.h>
#include <set>
-#if defined(__GLIBC__)
-// glibc doesn't expose gettid(2).
-pid_t gettid() { return syscall(__NR_gettid); }
-#endif // __GLIBC__
+extern "C" pid_t gettid();
// For x86, bionic and glibc have per-thread stack guard values (all identical).
#if defined(__i386__)