__ms_timeval does not exist unless winsock.h or winsock2.h is included. So, test for __WINDOWS__ before using __ms_timeval. Fixes #18456