ws2tcpip.h defines socklen_t
link the library with -lws2_32