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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-07-14 12:33:50 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-07-14 12:33:50 +0300
commitcba0858ccd74ba983f92d6b7dfc41c2a2d3bf398 (patch)
treeb66990d02691a19f20d674a34a1948d77e75ab29 /source/blender/blenlib/BLI_endian_switch_inline.h
parent82740cd282636fe318c3e4c7c3b1c2033857350d (diff)
Fix for recent optimization commit in endian switch
Pre-4.8 GCC had a bug which lead to non-exposed __builtin_bswap16() symbol. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 for details.
Diffstat (limited to 'source/blender/blenlib/BLI_endian_switch_inline.h')
-rw-r--r--source/blender/blenlib/BLI_endian_switch_inline.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_endian_switch_inline.h b/source/blender/blenlib/BLI_endian_switch_inline.h
index 9c4e819399a..280503e9b93 100644
--- a/source/blender/blenlib/BLI_endian_switch_inline.h
+++ b/source/blender/blenlib/BLI_endian_switch_inline.h
@@ -42,7 +42,7 @@ BLI_INLINE void BLI_endian_switch_int16(short *val)
}
BLI_INLINE void BLI_endian_switch_uint16(unsigned short *val)
{
-#ifdef __GNUC__
+#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 408)) /* gcc4.8+ only */
*val = __builtin_bswap16(*val);
#else
unsigned short tval = *val;