1
0
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:
Arvid Gerstmann 2018-05-04 09:30:32 +02:00
parent 8d726f81f0
commit 235d57c591

View File

@ -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;
}