From 4e966497ce3674286f38faab68679201ec6ca22e Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 26 Feb 2015 14:45:13 +0100 Subject: 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 --- src/corelib/tools/qsimd.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 } #endif -#endif // Q_OS_WIN +#elif defined(Q_OS_ANDROID) +# define ffs __builtin_ffs +#endif QBasicAtomicInt qt_cpu_features = Q_BASIC_ATOMIC_INITIALIZER(0); -- cgit v1.2.3