Skip to content

Commit

Permalink
Add fallback to bswap_16 for gcc on Windows (closes stephane#377)
Browse files Browse the repository at this point in the history
Thanks to dreamflow for the issue.
  • Loading branch information
stephane committed Apr 25, 2017
1 parent c258137 commit 1d3c640
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modbus-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1d3c640

Please sign in to comment.