summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-30 19:52:59 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-30 19:52:59 +0300
commit3d9372a2b17f50cfe2fca55dc59ad2db66df2e97 (patch)
treee97258bcea8ec63c1df1ef3eddedf2a1203002d5 /src/utils
parente0ced0ca822ce5459be5191381015411eed5af2d (diff)
downloadmv-3d9372a2b17f50cfe2fca55dc59ad2db66df2e97.tar.gz
mv-3d9372a2b17f50cfe2fca55dc59ad2db66df2e97.tar.bz2
mv-3d9372a2b17f50cfe2fca55dc59ad2db66df2e97.tar.xz
mv-3d9372a2b17f50cfe2fca55dc59ad2db66df2e97.zip
Fix compilation on not x86/amd64 arches.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/cpu.cpp5
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
}