You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With MinGw and GCC 14 (debian 13 testsing), I have the error :
Making all in src
CC modbus.lo
CC modbus-data.lo
CC modbus-rtu.lo
CC modbus-tcp.lo
../../src/modbus-tcp.c: In function '_modbus_tcp_set_ipv4_options':
../../src/modbus-tcp.c:239:50: error: passing argument 4 of 'setsockopt' from incompatible pointer type [-Wincompatible-pointer-types]
239 | rc = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &option, sizeof(int));
| ^~~~~~~
| |
| int *
In file included from ../../src/modbus-tcp.c:31:
/usr/share/mingw-w64/include/winsock2.h:1035:88: note: expected 'const char *' but argument is of type 'int *'
1035 | WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
| ~~~~~~~~~~~~^~~~~~
../../src/modbus-tcp.c: In function 'modbus_tcp_listen':
../../src/modbus-tcp.c:566:53: error: passing argument 4 of 'setsockopt' from incompatible pointer type [-Wincompatible-pointer-types]
566 | if (setsockopt(new_s, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable)) == -1) {
| ^~~~~~~
| |
| int *
/usr/share/mingw-w64/include/winsock2.h:1035:88: note: expected 'const char *' but argument is of type 'int *'
1035 | WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
| ~~~~~~~~~~~~^~~~~~
../../src/modbus-tcp.c: In function 'modbus_tcp_pi_listen':
../../src/modbus-tcp.c:683:58: error: passing argument 4 of 'setsockopt' from incompatible pointer type [-Wincompatible-pointer-types]
683 | rc = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable));
| ^~~~~~~
| |
| int *
/usr/share/mingw-w64/include/winsock2.h:1035:88: note: expected 'const char *' but argument is of type 'int *'
1035 | WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
| ~~~~~~~~~~~~^~~~~~
make[2]: *** [Makefile:486: modbus-tcp.lo] Error 1
make[1]: *** [Makefile:505: all-recursive] Error 1
make: *** [Makefile:391: all] Error 2
With MinGw and GCC 14 (debian 13 testsing), I have the error :
This problem appeared with: dde16d5
The text was updated successfully, but these errors were encountered: