diff options
Diffstat (limited to 'extra/qt4/declarative-fix-sigbus.patch')
-rw-r--r-- | extra/qt4/declarative-fix-sigbus.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/extra/qt4/declarative-fix-sigbus.patch b/extra/qt4/declarative-fix-sigbus.patch new file mode 100644 index 000000000..0d446fce5 --- /dev/null +++ b/extra/qt4/declarative-fix-sigbus.patch @@ -0,0 +1,33 @@ +--- qt-everywhere-opensource-src-4.8.0.orig/src/declarative/qml/qdeclarativevmemetaobject.cpp 2012-02-04 21:23:56.573395948 +0100 ++++ qt-everywhere-opensource-src-4.8.0/src/declarative/qml/qdeclarativevmemetaobject.cpp 2012-02-04 23:32:44.900073230 +0100 +@@ -39,6 +39,7 @@ + ** + ****************************************************************************/ + ++#include <cstring> + #include "private/qdeclarativevmemetaobject_p.h" + + #include "qdeclarative.h" +@@ -191,10 +192,12 @@ + + double QDeclarativeVMEVariant::asDouble() + { ++ double result; + if (type != QMetaType::Double) + setValue(double(0)); + +- return *(double *)(dataPtr()); ++ std::memcpy(&result, (double *)(dataPtr()), sizeof(result)); ++ return result; + } + + const QString &QDeclarativeVMEVariant::asQString() +@@ -298,7 +301,7 @@ + cleanup(); + type = QMetaType::Double; + } +- *(double *)(dataPtr()) = v; ++ std::memcpy((double *)(dataPtr()), &v, sizeof(v)); + } + + void QDeclarativeVMEVariant::setValue(const QString &v) |