summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/websockets/qwebsocketprotocol_p.cpp2
-rw-r--r--src/websockets/qwebsocketprotocol_p.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/websockets/qwebsocketprotocol_p.cpp b/src/websockets/qwebsocketprotocol_p.cpp
index 09e717f..ff34ff4 100644
--- a/src/websockets/qwebsocketprotocol_p.cpp
+++ b/src/websockets/qwebsocketprotocol_p.cpp
@@ -163,7 +163,7 @@ void mask(QByteArray *payload, quint32 maskingKey)
Masks the \a payload of length \a size with the given \a maskingKey and stores the result back in \a payload.
\internal
*/
-void mask(char *payload, quint64 size, quint32 maskingKey)
+void mask(Q_DECL_ALIGN(4) char *payload, quint64 size, quint32 maskingKey)
{
quint32 *payloadData = reinterpret_cast<quint32 *>(payload);
quint32 numIterations = static_cast<quint32>(size / sizeof(quint32));
diff --git a/src/websockets/qwebsocketprotocol_p.h b/src/websockets/qwebsocketprotocol_p.h
index e775179..26411f7 100644
--- a/src/websockets/qwebsocketprotocol_p.h
+++ b/src/websockets/qwebsocketprotocol_p.h
@@ -67,7 +67,7 @@ inline bool isCloseCodeValid(int closeCode)
}
void Q_AUTOTEST_EXPORT mask(QByteArray *payload, quint32 maskingKey);
-void Q_AUTOTEST_EXPORT mask(char *payload, quint64 size, quint32 maskingKey);
+void Q_AUTOTEST_EXPORT mask(Q_DECL_ALIGN(4) char *payload, quint64 size, quint32 maskingKey);
} //end namespace QWebSocketProtocol
QT_END_NAMESPACE