Define gettid symbol when testing on glibc < 2.30

Bug: 289414897
Test: it builds
Change-Id: Ic44514953f34096e8a681ef2587439953096ba53
This commit is contained in:
Tomasz Wasilczyk 2023-07-28 09:15:52 -07:00
parent 85beaceda3
commit 704e4e6936

View file

@ -28,6 +28,7 @@
#include "utils.h"
#include <syscall.h>
#include <string>
#include <android-base/properties.h>
@ -63,3 +64,9 @@ bool IsLowRamDevice() {
(android::base::GetBoolProperty("ro.debuggable", false) &&
android::base::GetBoolProperty("debug.force_low_ram", false));
}
#if defined(__GLIBC__) && __GLIBC_MINOR__ < 30
pid_t gettid() {
return syscall(__NR_gettid);
}
#endif