2ad9816
diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp
2ad9816
index 1cb383c9..6bfdee55 100644
2ad9816
--- a/src/tools/moc/main.cpp
2ad9816
+++ b/src/tools/moc/main.cpp
2ad9816
@@ -230,6 +230,11 @@ int runMoc(int argc, char **argv)
2ad9816
     Moc moc;
2ad9816
     pp.macros["Q_MOC_RUN"];
2ad9816
     pp.macros["__cplusplus"];
2ad9816
+    pp.macros["_SYS_SYSMACROS_H_OUTER"];
2ad9816
+    Macro macro;
2ad9816
+    macro.symbols = Preprocessor::tokenize(QByteArray::number(Q_PROCESSOR_WORDSIZE*8), 1, Preprocessor::TokenizeDefine);
2ad9816
+    macro.symbols.removeLast(); // remove the EOF symbol
2ad9816
+    pp.macros.insert("__WORDSIZE", macro);
2ad9816
 
2ad9816
     // Don't stumble over GCC extensions
2ad9816
     Macro dummyVariadicFunctionMacro;