I was just trying to build netcat in MSYS using MinGW and realized that MinGW never really ported all of the BSD socket stuff to Windows (eg sys/socket.h). I know you can u
See the stackoverflow link : Where does one get the "sys/socket.h" header/source file?
The answer/solution is more explicit.