path: root/src
diff options
authorEskil Abrahamsen Blomfeldt <>2015-02-26 14:45:13 +0100
committerJani Heikkinen <>2015-02-27 05:54:36 +0000
commit4e966497ce3674286f38faab68679201ec6ca22e (patch)
treed12535ba25337549af0174752713a31a4407854a /src
parent3f858a07726666222372f793f1e1a5de3c8ec373 (diff)
Android: Fix compilation for x86
Bionic on x86 does not have an implementation of ffs(), for some reason. The declaration is available in strings.h, but causes a linker error. The toolchain has a builtin version though, which can be used instead. Change-Id: Iaf4c27542c1aabe88713842303251db44ae6ba86 Reviewed-by: Jani Heikkinen <> Reviewed-by: Christian Stromme <> Reviewed-by: Thiago Macieira <>
Diffstat (limited to 'src')
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index a031080fdb..52ffc161bf 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -512,7 +512,9 @@ int ffs(int i)
-#endif // Q_OS_WIN
+#elif defined(Q_OS_ANDROID)
+# define ffs __builtin_ffs
QBasicAtomicInt qt_cpu_features = Q_BASIC_ATOMIC_INITIALIZER(0);