I found a crash using your library on MACOS with the error "Illegal Instruction : 4" when attempting to launch the random-test-server file.
This problem is due to the fail of the bind system function when the sockaddr_in is not formatted following the apple standard
After some search on the Internet and some debugging with XCODE I modified the modbus_tcp_listen function in modbus-tcp.c file.
patch.txt
Please note that my code does not impact the original one when used on other platforms.
Please refer to the patch in attachment to this email that solves the issue.
Hi all.
I found a crash using your library on MACOS with the error "Illegal Instruction : 4" when attempting to launch the random-test-server file. This problem is due to the fail of the bind system function when the sockaddr_in is not formatted following the apple standard
After some search on the Internet and some debugging with XCODE I modified the modbus_tcp_listen function in modbus-tcp.c file. patch.txt
Please note that my code does not impact the original one when used on other platforms.
Please refer to the patch in attachment to this email that solves the issue.
Kind Regards.
Virgilio eng. Villatora