forked from bartvdbraak/blender
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:
parent
82740cd282
commit
cba0858ccd
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user