mirror of
https://github.com/google/cpu_features.git
synced 2025-04-27 23:22:31 +02:00
Fix failing tests on Linux & Android
This commit is contained in:
parent
8d726f81f0
commit
235d57c591
@ -110,13 +110,13 @@ static uint32_t GetElfHwcapFromProcSelfAuxv(uint32_t hwcap_type) {
|
||||
} entry;
|
||||
uint32_t result = 0;
|
||||
const char filepath[] = "/proc/self/auxv";
|
||||
const int fd = OpenFile(filepath);
|
||||
const int fd = CpuFeatures_OpenFile(filepath);
|
||||
if (fd < 0) {
|
||||
D("Could not open %s\n", filepath);
|
||||
return 0;
|
||||
}
|
||||
for (;;) {
|
||||
const int ret = ReadFile(fd, (char*)&entry, sizeof entry);
|
||||
const int ret = CpuFeatures_ReadFile(fd, (char*)&entry, sizeof entry);
|
||||
if (ret < 0) {
|
||||
D("Error while reading %s\n", filepath);
|
||||
break;
|
||||
@ -130,7 +130,7 @@ static uint32_t GetElfHwcapFromProcSelfAuxv(uint32_t hwcap_type) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
CloseFile(fd);
|
||||
CpuFeatures_CloseFile(fd);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user