Define gettid symbol when testing on glibc < 2.30
Bug: 289414897 Test: it builds Change-Id: Ic44514953f34096e8a681ef2587439953096ba53
This commit is contained in:
parent
85beaceda3
commit
704e4e6936
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue