-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
$ make install
Making install in src
CC modbus-tcp.lo
modbus-tcp.c: In function '_modbus_tcp_set_ipv4_options':
modbus-tcp.c:239:50: error: passing argument 4 of 'setsockopt' from incompatible pointer type [-Winc
ompatible-pointer-types]
239 | rc = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &option, sizeof(int));
| ^~~~~~~
| |
| int *
In file included from modbus-tcp.c:31:
C:/msys64/mingw64/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 *optv
l,int optlen);
| ~~~~~~~~~~~~^~~~
~
modbus-tcp.c: In function 'modbus_tcp_listen':
modbus-tcp.c:566:53: error: passing argument 4 of 'setsockopt' from incompatible pointer type [-Winc
ompatible-pointer-types]
566 | if (setsockopt(new_s, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable)) == -1) {
| ^~~~~~~
| |
| int *
C:/msys64/mingw64/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 *optv
l,int optlen);
| ~~~~~~~~~~~~^~~~
~
modbus-tcp.c: In function 'modbus_tcp_pi_listen':
modbus-tcp.c:683:58: error: passing argument 4 of 'setsockopt' from incompatible pointer type [-Winc
ompatible-pointer-types]
683 | rc = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable));
| ^~~~~~~
| |
| int *
C:/msys64/mingw64/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 *optv
l,int optlen);
| ~~~~~~~~~~~~^~~~
~
make[1]: *** [Makefile:486: modbus-tcp.lo] Error 1
make: *** [Makefile:505: install-recursive] Error 1