#ifdef HAVE_MINGW
#include <w32api.h>
#ifdef HAVE_MINGW
#include <w32api.h>
#include <windows.h>
#include <ws2tcpip.h>
#endif
#include <windows.h>
#include <ws2tcpip.h>
#endif
#include <sys/time.h>
#endif
#include <sys/time.h>
#endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif