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
path: root/src/Net.h
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2015-11-28 19:17:59 +0300
committerMikkel Krautz <mikkel@krautz.dk>2015-11-28 19:18:01 +0300
commit5dac7e81a4cf21dca6ab30d8b916c140dd801533 (patch)
tree8e77c37f99a68746cd08e8e2cd79ba4506dbbe44 /src/Net.h
parent2fdbc8376a097be81c84cede6aa7b4b5d981f1c9 (diff)
Net: GCC 4.2 on FreeBSD 9.3 does not have __builtin_bswap.
So work around it. From searching the web, it would seem that GCC 4.2 should include it. But in this case, it seems like it does not. Maybe the version check is not strict enough for all systems. But this works for now.
Diffstat (limited to 'src/Net.h')
-rw-r--r--src/Net.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Net.h b/src/Net.h
index b58eefb5a..f21d77fb9 100644
--- a/src/Net.h
+++ b/src/Net.h
@@ -91,7 +91,7 @@ struct Ban {
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
#define SWAP64(x) (x)
#else
-#ifdef __x86_64__
+#if defined(__x86_64__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define SWAP64(x) __builtin_bswap64(x)
#else
#define SWAP64(x) qbswap<quint64>(x)