From 1d3c6401f8186b54453ba64606758a90b6ec3fca Mon Sep 17 00:00:00 2001 From: Stéphane Raimbault Date: Tue, 25 Apr 2017 19:28:18 +0200 Subject: [PATCH] Add fallback to bswap_16 for gcc on Windows (closes #377) --- src/modbus-data.c | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/src/modbus-data.c b/src/modbus-data.c index 902b8c6..03e5d3c 100644 --- a/src/modbus-data.c +++ b/src/modbus-data.c @@ -40,6 +40,8 @@ # define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__ * 10) # if GCC_VERSION >= 430 // Since GCC >= 4.30, GCC provides __builtin_bswapXX() alternatives so we switch to them +# undef bswap_16 +# define bswap_16 __builtin_bswap16 # undef bswap_32 # define bswap_32 __builtin_bswap32 # endif -- libgit2 0.21.4