From 005bcd6fbab124fa6043b0261aa7b64afc276e9a Mon Sep 17 00:00:00 2001 From: Stéphane Raimbault Date: Wed, 26 Apr 2017 22:31:04 +0200 Subject: [PATCH] Use builtin bswap16 of gcc 4.8 (#377) --- src/modbus-data.c | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/src/modbus-data.c b/src/modbus-data.c index 902b8c6..916a501 100644 --- a/src/modbus-data.c +++ b/src/modbus-data.c @@ -43,6 +43,10 @@ # undef bswap_32 # define bswap_32 __builtin_bswap32 # endif +# if GCC_VERSION >= 480 +# undef bswap_16 +# define bswap_16 __builtin_bswap16 +# endif #endif #if defined(_MSC_VER) && (_MSC_VER >= 1400) -- libgit2 0.21.4