Guard x86 cache line size

pull/838/head
Jeffrey Walton 2019-05-08 21:20:49 -04:00
parent 72a71eb230
commit ef3968f551
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 1 additions and 1 deletions

View File

@ -464,7 +464,7 @@ void DetectX86Features()
// Glibc does not implement on some platforms. The runtime returns 0 instead of error. // Glibc does not implement on some platforms. The runtime returns 0 instead of error.
// https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/posix/sysconf.c // https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/posix/sysconf.c
int cacheLineSize = sysconf(_SC_LEVEL1_DCACHE_LINESIZE); int cacheLineSize = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
if (cacheLineSize > 0) if (g_cacheLineSize == 0 && cacheLineSize > 0)
g_cacheLineSize = cacheLineSize; g_cacheLineSize = cacheLineSize;
#endif #endif