--- src/libtomahawk/accounts/ResolverAccount.cpp.orig
+++ src/libtomahawk/accounts/ResolverAccount.cpp
@@ -44,6 +44,17 @@
 #include <QFileInfo>
 #include <QDir>
 
+#include <limits.h>
+
+#ifndef __WORDSIZE
+# if ULONG_MAX == 0xffffffffffffffff
+#  define __WORDSIZE 64
+# elif ULONG_MAX == 0xffffffff
+#  define __WORDSIZE 32
+# endif /* ULONG_MAX */
+#endif /* __WORDSIZE */
+
+
 #define MANUALRESOLVERS_DIR "manualresolvers"
 
 using namespace Tomahawk;
