void-packages/srcpkgs/QMPlay2/patches/arm-QAtomic64.patch
Jürgen Buchmüller 4ebd08a0e5
QMPlay2: fix armv6l build
Closes: #3970
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2018-10-21 13:45:09 +02:00

24 lines
577 B
Diff

--- 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)