diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2015-11-28 19:17:59 +0300 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2015-11-28 19:18:01 +0300 |
commit | 5dac7e81a4cf21dca6ab30d8b916c140dd801533 (patch) | |
tree | 8e77c37f99a68746cd08e8e2cd79ba4506dbbe44 | |
parent | 2fdbc8376a097be81c84cede6aa7b4b5d981f1c9 (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.
-rw-r--r-- | src/Net.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |