what crazicrafter1 suggested worked for me. Instead of deleting the whole 21 lines or so I just replaced #include <winsock.h> inside the #ifndef WIN32_LEAN_AND_MEAN block to #inlcude <winsock2.h>.