From 3d9372a2b17f50cfe2fca55dc59ad2db66df2e97 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 30 Apr 2015 19:52:59 +0300 Subject: Fix compilation on not x86/amd64 arches. --- src/utils/cpu.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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 } -- cgit v1.2.3-70-g09d2