diff -urN libmowgli-2-2.1.3-orig/src/libmowgli/eventloop/eventloop.h libmowgli-2-2.1.3/src/libmowgli/eventloop/eventloop.h
--- libmowgli-2-2.1.3-orig/src/libmowgli/eventloop/eventloop.h	2017-09-16 06:17:58 +0800
+++ libmowgli-2-2.1.3/src/libmowgli/eventloop/eventloop.h	2021-11-01 23:42:20 +0800
@@ -26,6 +26,10 @@
 # include <mach/mach.h>
 # include <mach/mach_time.h>
 
+#else
+
+#include "platform/machine.h"
+
 #endif
 
 #ifndef _WIN32
@@ -186,17 +190,7 @@
 {
 	long long time_;
 
-#if defined(CLOCK_MONOTONIC)
-	struct timespec tp;
-
-	clock_gettime(CLOCK_MONOTONIC, &tp);
-	time_ = tp.tv_sec;
-#elif defined(CLOCK_HIGHRES)
-	struct timespec tp;
-
-	clock_gettime(CLOCK_HIGHRES, &tp);
-	time_ = tp.tv_sec;
-#elif defined(MOWGLI_OS_WIN)
+#if defined(MOWGLI_OS_WIN)
 	static ULONGLONG (CALLBACK *GetTickCount64)(void) = NULL;
 	static OSVERSIONINFOEX *winver = NULL;
 	static bool load_err = false;
diff -urN libmowgli-2-2.1.3-orig/src/libmowgli/platform/machine.h libmowgli-2-2.1.3/src/libmowgli/platform/machine.h
--- libmowgli-2-2.1.3-orig/src/libmowgli/platform/machine.h	2017-09-16 06:17:58 +0800
+++ libmowgli-2-2.1.3/src/libmowgli/platform/machine.h	2021-11-01 23:14:34 +0800
@@ -212,7 +212,7 @@
 #  define MOWGLI_CPU_ENDIAN_BIG
 #  define MOWGLI_CPU_ENDIAN big
 # endif
-#elif defined __WINDOWS__ || defined _WIN32 || defined __WIN32__ || defined __TOS_WIN__
+#elif defined __WINDOWS__ || defined _WIN32 || defined __WIN32__ || defined __TOS_WIN__ || defined __clang__
 # if defined _WIN64
 #  define MOWGLI_OS_WIN64
 #  define MOWGLI_OS win64
diff -urN libmowgli-2-2.1.3-orig/src/libmowgli/platform/win32/inet.c libmowgli-2-2.1.3/src/libmowgli/platform/win32/inet.c
--- libmowgli-2-2.1.3-orig/src/libmowgli/platform/win32/inet.c	2017-09-16 06:17:58 +0800
+++ libmowgli-2-2.1.3/src/libmowgli/platform/win32/inet.c	2021-11-01 22:38:31 +0800
@@ -20,7 +20,7 @@
 
 #include "mowgli.h"
 
-#ifdef _WIN32
+#ifdef _MSC_VER
 
 int
 inet_pton(int af, const char *src, void *dst)
@@ -80,3 +80,16 @@
 }
 
 #endif
+
+void usleep(__int64 usec) 
+{ 
+    HANDLE timer; 
+    LARGE_INTEGER ft; 
+
+    ft.QuadPart = -(10*usec); // Convert to 100 nanosecond interval, negative value indicates relative time
+    timer = CreateWaitableTimer(NULL, TRUE, NULL); 
+    SetWaitableTimer(timer, &ft, 0, NULL, NULL, 0); 
+    WaitForSingleObject(timer, INFINITE); 
+    CloseHandle(timer); 
+}
+
diff -urN libmowgli-2-2.1.3-orig/src/libmowgli/platform/win32/win32_stdinc.h libmowgli-2-2.1.3/src/libmowgli/platform/win32/win32_stdinc.h
--- libmowgli-2-2.1.3-orig/src/libmowgli/platform/win32/win32_stdinc.h	2017-09-16 06:17:58 +0800
+++ libmowgli-2-2.1.3/src/libmowgli/platform/win32/win32_stdinc.h	2021-11-01 22:37:27 +0800
@@ -41,8 +41,7 @@
 extern int pipe(int pipefd[2]);
 extern int socketpair(int domain, int type, int protocol, int pipefd[2]);
 extern int fork(void);
-extern int inet_pton(int af, const char *src, void *dst);
-extern const char *inet_ntop(int af, const void *addr, char *host, size_t hostlen);
+extern void usleep(__int64 usec);
 
 /* MSYS autoconf is fucko. */
 # ifndef HAVE_WINSOCK2_H
