-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modbus-data.c: fix for bswap_16 fallback #377
Comments
Thank you |
I should have tested to avoid a blind push... |
the TravisCI report in the revert commit bf30047 was very helpful to find the cause: therefore a possible solution would be in src/modbus-data.c to change also line 41 to
all in all, if in src/modbus-data.c the lines 39-46 would change to
then the __builtin_bswap16 could compile without the "fallback" warning in today i've already made a live test on real modbus-RS485-hardware, |
What do you think of my patch (still use bswap32 for older releases and >=)? |
your patch is very good. i've test-compiled the bswap_16-#377-branch |
Merged. Thank you. |
Thanks to dreamflow for the issue.
)" This reverts commit 1d3c640. TravisCI reports: ../src/.libs/libmodbus.so: undefined reference to `__builtin_bswap16' with gcc 4.6.3
Thanks to dreamflow for the issue.
)" This reverts commit 1d3c640. TravisCI reports: ../src/.libs/libmodbus.so: undefined reference to `__builtin_bswap16' with gcc 4.6.3
when compiling the newest libmodbus master branch with
GCC 6.3.0 (MinGW-w64 MSYS) on Win7 32bit via the steps:
make warns:
it can be resolved by adding in src/modbus-data.c directly under the line 42
these 2 new lines
The text was updated successfully, but these errors were encountered: