i686-w64-mingw32-gcc -o pwnat.exe -O3 -DWIN32 src/socket.c src/message.c src/strlcpy.c src/client.c src/packet.c src/list.c src/udpserver.c src/udpclient.c src/pwnat.c src/destination.c -lws2_32
In file included from src/socket.h:34,
from src/socket.c:35:
src/common.h:31:72: warning: parameter 2 (‘src’) has void type
31 | WINSOCK_API_LINKAGE const char WSAAPI inet_ntop(int af, const void src, char *dst, socklen_t size);
| ~~~~~~~~~~~^~~
src/socket.c: In function ‘sock_connect’:
src/socket.c:154:52: warning: passing argument 4 of ‘setsockopt’ from incompatible pointer type [-Wincompatible-pointer-types]
154 | setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(int));
| ^~~~~~~~~~
| |
| int *
In file included from src/socket.h:30,
from src/socket.c:35:
/usr/share/mingw-w64/include/winsock2.h:1029:88: note: expected ‘const char *’ but argument is of type ‘int *’
1029 | WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
| ~~~~~~~~~~~~^~~~~~
src/socket.c:155:38: error: ‘SO_REUSEPORT’ undeclared (first use in this function); did you mean ‘PO_REN_PORT’?
155 | setsockopt(sock->fd, SOL_SOCKET, SO_REUSEPORT, &reuseport, sizeof(int));
| ^~~~~~~~~~~~
| PO_REN_PORT
src/socket.c:155:38: note: each undeclared identifier is reported only once for each function it appears in
src/socket.c:155:52: warning: passing argument 4 of ‘setsockopt’ from incompatible pointer type [-Wincompatible-pointer-types]
155 | setsockopt(sock->fd, SOL_SOCKET, SO_REUSEPORT, &reuseport, sizeof(int));
| ^~~~~~~~~~
| |
| int *
In file included from src/socket.h:30,
from src/socket.c:35:
/usr/share/mingw-w64/include/winsock2.h:1029:88: note: expected ‘const char *’ but argument is of type ‘int *’
1029 | WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
| ~~~~~~~~~~~~^~~~~~
In file included from src/message.c:30:
src/common.h:31:72: warning: parameter 2 (‘src’) has void type
31 | WINSOCK_API_LINKAGE const char WSAAPI inet_ntop(int af, const void src, char *dst, socklen_t size);
| ~~~~~~~~~~~^~~
In file included from src/client.c:29:
src/common.h:31:72: warning: parameter 2 (‘src’) has void type
31 | WINSOCK_API_LINKAGE const char WSAAPI inet_ntop(int af, const void src, char *dst, socklen_t size);
| ~~~~~~~~~~~^~~
src/client.c: In function ‘client_send_udp_data’:
src/client.c:312:5: warning: implicit declaration of function ‘gettimeofday’ [-Wimplicit-function-declaration]
312 | gettimeofday(&client->tcp2udp_timeout, NULL);
| ^~~~~~~~~~~~
In file included from src/packet.c:22:
src/common.h:31:72: warning: parameter 2 (‘src’) has void type
31 | WINSOCK_API_LINKAGE const char WSAAPI inet_ntop(int af, const void src, char *dst, socklen_t size);
| ~~~~~~~~~~~^~~
In file included from src/list.h:25,
from src/list.c:24:
src/common.h:31:72: warning: parameter 2 (‘src’) has void type
31 | WINSOCK_API_LINKAGE const char WSAAPI inet_ntop(int af, const void src, char *dst, socklen_t size);
| ~~~~~~~~~~~^~~
In file included from src/udpserver.c:35:
src/common.h:31:72: warning: parameter 2 (‘src’) has void type
31 | WINSOCK_API_LINKAGE const char WSAAPI inet_ntop(int af, const void src, char *dst, socklen_t size);
| ~~~~~~~~~~~^~~
In file included from src/udpclient.c:43:
src/common.h:31:72: warning: parameter 2 (‘src’) has void type
31 | WINSOCK_API_LINKAGE const char WSAAPI inet_ntop(int af, const void src, char *dst, socklen_t size);
| ~~~~~~~~~~~^~~
src/udpclient.c: In function ‘udpclient’:
src/udpclient.c:143:70: warning: implicit declaration of function ‘hstrerror’; did you mean ‘strerror’? [-Wimplicit-function-declaration]
143 | printf("Couldn't resolve server address: '%s': %s\n", phost, hstrerror(h_errno));
| ^~~~~~~~~
| strerror
In file included from src/pwnat.c:33:
src/common.h:31:72: warning: parameter 2 (‘src’) has void type
31 | WINSOCK_API_LINKAGE const char WSAAPI inet_ntop(int af, const void src, char *dst, socklen_t size);
|