Use <AK/Windows.h> instead of windows.h/winsock2.h to avoid timeval-related errors. Note: winsock2.h includes windows.h