Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ByteSwap.h')
-rw-r--r--src/ByteSwap.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ByteSwap.h b/src/ByteSwap.h
index 54521ef85..d570351cc 100644
--- a/src/ByteSwap.h
+++ b/src/ByteSwap.h
@@ -6,14 +6,17 @@
#ifndef MUMBLE_BYTESWAP_H_
#define MUMBLE_BYTESWAP_H_
+#include <QtCore/QtGlobal>
+
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
-#define SWAP64(x) (x)
-#else
-#if defined(__x86_64__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
-#define SWAP64(x) __builtin_bswap64(x)
+# define SWAP64(x) (x)
#else
-#define SWAP64(x) qbswap<quint64>(x)
-#endif
+# if defined(__x86_64__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+# define SWAP64(x) __builtin_bswap64(x)
+# else
+# include <QtCore/QtEndian>
+# define SWAP64(x) qbswap<quint64>(x)
+# endif
#endif
#endif