diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-14 12:33:50 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-14 12:33:50 +0300 |
commit | cba0858ccd74ba983f92d6b7dfc41c2a2d3bf398 (patch) | |
tree | b66990d02691a19f20d674a34a1948d77e75ab29 /source/blender | |
parent | 82740cd282636fe318c3e4c7c3b1c2033857350d (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')
-rw-r--r-- | source/blender/blenlib/BLI_endian_switch_inline.h | 2 |
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; |