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.
This commit is contained in:
Sergey Sharybin 2015-07-14 11:33:50 +02:00
parent 82740cd282
commit cba0858ccd
1 changed files with 1 additions and 1 deletions

View File

@ -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;