QMPlay2: fix armv6l build

Closes: #3970
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
Jürgen Buchmüller 2018-10-21 13:44:29 +02:00
parent 96f49cd1f5
commit 4ebd08a0e5
No known key found for this signature in database
GPG key ID: 6764EC32352D0647

View file

@ -0,0 +1,24 @@
--- src/qmplay2/QMPlay2OSD.cpp.orig 2018-10-21 13:35:36.079993098 +0200
+++ src/qmplay2/QMPlay2OSD.cpp 2018-10-21 13:38:08.398003961 +0200
@@ -19,11 +19,21 @@
#include <QMPlay2OSD.hpp>
#include <QAtomicInteger>
+#ifdef Q_ATOMIC_INT64_IS_SUPPORTED
static QAtomicInteger<quint64> g_id;
+#else
+static QAtomicInteger<quint32> g_id[2];
+#endif
void QMPlay2OSD::genId()
{
+#ifdef Q_ATOMIC_INT64_IS_SUPPORTED
m_id = ++g_id;
+#else
+ if (0 == ++g_id[0])
+ ++g_id[1];
+ m_id = (static_cast<quint64>(g_id[1]) << 32) | g_id[0];
+#endif
}
void QMPlay2OSD::clear(bool all)