diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-30 19:52:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-30 19:52:59 +0300 |
commit | 3d9372a2b17f50cfe2fca55dc59ad2db66df2e97 (patch) | |
tree | e97258bcea8ec63c1df1ef3eddedf2a1203002d5 /src | |
parent | e0ced0ca822ce5459be5191381015411eed5af2d (diff) | |
download | plus-3d9372a2b17f50cfe2fca55dc59ad2db66df2e97.tar.gz plus-3d9372a2b17f50cfe2fca55dc59ad2db66df2e97.tar.bz2 plus-3d9372a2b17f50cfe2fca55dc59ad2db66df2e97.tar.xz plus-3d9372a2b17f50cfe2fca55dc59ad2db66df2e97.zip |
Fix compilation on not x86/amd64 arches.
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/cpu.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utils/cpu.cpp b/src/utils/cpu.cpp index bac265f3c..1fe89a4f1 100644 --- a/src/utils/cpu.cpp +++ b/src/utils/cpu.cpp @@ -30,7 +30,8 @@ int mCpuFlags = 0; void Cpu::detect() { -#if defined(__GNUC__) && (GCC_VERSION >= 40800) && !defined(ANDROID) +#if (defined(__amd64__) || defined(__i386__)) && defined(__GNUC__) \ + && (GCC_VERSION >= 40800) && !defined(ANDROID) __builtin_cpu_init(); if (__builtin_cpu_supports ("mmx")) mCpuFlags |= FEATURE_MMX; @@ -85,6 +86,8 @@ void Cpu::detect() } fclose(file); logger->log("cpu features was not detected"); +#else + logger->log("cpu features not supported"); #endif } |