summaryrefslogtreecommitdiff
path: root/lib/legacy/zstd_v06.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/legacy/zstd_v06.c')
-rw-r--r--lib/legacy/zstd_v06.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/legacy/zstd_v06.c b/lib/legacy/zstd_v06.c
index 19116f108148c..8b068b3e54640 100644
--- a/lib/legacy/zstd_v06.c
+++ b/lib/legacy/zstd_v06.c
@@ -189,7 +189,7 @@ MEM_STATIC U32 MEM_swap32(U32 in)
{
#if defined(_MSC_VER) /* Visual Studio */
return _byteswap_ulong(in);
-#elif defined (__GNUC__)
+#elif defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)
return __builtin_bswap32(in);
#else
return ((in << 24) & 0xff000000 ) |
@@ -203,7 +203,7 @@ MEM_STATIC U64 MEM_swap64(U64 in)
{
#if defined(_MSC_VER) /* Visual Studio */
return _byteswap_uint64(in);
-#elif defined (__GNUC__)
+#elif defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)
return __builtin_bswap64(in);
#else
return ((in << 56) & 0xff00000000000000ULL) |