diff --git a/CMakeLists.txt b/CMakeLists.txt
index 670ec86c4a242e3afe5f0609c257488929b60e47..51540d7372095cd640a57d1898824e39b221c7da 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,14 +17,14 @@ if(NOT (${SUBMODULES_NO_BUILD} MATCHES ON))
 
 endif()
 
-file(GLOB DAP_SERVER_CORE_SOURCES src/*.c)
-file(GLOB DAP_SERVER_CORE_HEADERS include/*.h)
+file(GLOB DAP_SERVER_CORE_SOURCES src/*.c ../sources/wepoll/*.c)
+file(GLOB DAP_SERVER_CORE_HEADERS include/*.h ../sources/wepoll/*.h)
 
 if(WIN32)
   include_directories(../libdap/src/win32/)
+  #include_directories(../sources/wepoll/)
   include_directories(../3rdparty/libmemcached/)
   include_directories(../3rdparty/libmemcached/win32/)
-  include_directories(../3rdparty/wepoll/include/)
   include_directories(../3rdparty/uthash/src/)
   include_directories(../3rdparty/libjson-c/)
   include_directories(../3rdparty/curl/include/)
@@ -33,7 +33,7 @@ endif()
 add_library(${PROJECT_NAME} STATIC ${DAP_SERVER_CORE_HEADERS} ${DAP_SERVER_CORE_SOURCES})
 
 if(WIN32)
-  target_link_libraries(${PROJECT_NAME} dap_core dap_crypto ${CMAKE_CURRENT_SOURCE_DIR}/../lib/[x86_64CLANG]/wepoll[x86_64CLANG].a)
+  target_link_libraries(${PROJECT_NAME} dap_core dap_crypto)
 endif()
 
 if(UNIX)
diff --git a/include/dap_events_socket.h b/include/dap_events_socket.h
index cdd7d7b9f5d6e5b8e4802eb68b6ed2368d1b92f1..1e87beebbdc30a0dd9aefeab6eb967b006e7f0f3 100755
--- a/include/dap_events_socket.h
+++ b/include/dap_events_socket.h
@@ -29,6 +29,8 @@
 #include "uthash.h"
 #ifndef _WIN32
 #include <sys/epoll.h>
+#else
+#include "wepoll.h"
 #endif
 
 struct dap_events;
diff --git a/src/dap_client_remote.c b/src/dap_client_remote.c
index 0ed0956395e23b8687ed81297cd0c5833f327818..bedf02657d1bb535acee9e94419c93ae5f6d8c63 100755
--- a/src/dap_client_remote.c
+++ b/src/dap_client_remote.c
@@ -37,7 +37,6 @@
 #include <ws2tcpip.h>
 #include <io.h>
 //#include "wrappers.h"
-#include <wepoll.h>
 #include <pthread.h>
 #endif
 
diff --git a/src/dap_events.c b/src/dap_events.c
index 4de70b8e5b3a1e6f809e0831848bb5f6e27f8ba6..34a268b121220710f1ddd74b103c4075cca0c0b7 100755
--- a/src/dap_events.c
+++ b/src/dap_events.c
@@ -54,16 +54,12 @@
 #endif
 
 #else
-
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0600
 #include <winsock2.h>
 #include <windows.h>
 #include <mswsock.h>
 #include <ws2tcpip.h>
 #include <io.h>
 #include "wrappers.h"
-#include <wepoll.h>
 #include <pthread.h>
 #endif
 
diff --git a/src/dap_events_socket.c b/src/dap_events_socket.c
index 75c9ae20f8088061bd8ead55d7ddbe1071c5cbcc..2f431a0ff4d671db49f2d78bf1d0714244b12772 100755
--- a/src/dap_events_socket.c
+++ b/src/dap_events_socket.c
@@ -33,14 +33,12 @@
 #include <unistd.h>
 #include <fcntl.h>
 #else
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0600
 #include <winsock2.h>
 #include <windows.h>
 #include <mswsock.h>
 #include <ws2tcpip.h>
 #include <io.h>
-#include <wepoll.h>
+#include "wepoll.h"
 #include <pthread.h>
 #endif
 
diff --git a/src/dap_memcached.c b/src/dap_memcached.c
index 746d63ad1a1fff5245a82ca1d40ac31c99b5a7d8..3b41bd62ae36dc90ce8512c9303134acb2ff719c 100755
--- a/src/dap_memcached.c
+++ b/src/dap_memcached.c
@@ -1,13 +1,10 @@
 
 #ifdef _WIN32
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0600
 #include <winsock2.h>
 #include <windows.h>
 #include <mswsock.h>
 #include <ws2tcpip.h>
 #include <io.h>
-#include <wepoll.h>
 #include <pthread.h>
 
 #endif
diff --git a/src/dap_server.c b/src/dap_server.c
index eb9321f09b634c878fe2b385b6025727785d068a..4133562898f12a6884793989fc8cec604ba48bd4 100755
--- a/src/dap_server.c
+++ b/src/dap_server.c
@@ -46,15 +46,12 @@
 #include <sys/epoll.h>
 #include <sys/timerfd.h>
 #else
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0600
 #include <winsock2.h>
 #include <windows.h>
 #include <mswsock.h>
 #include <ws2tcpip.h>
 #include "wrappers.h"
 #include <io.h>
-#include <wepoll.h>
 #include <pthread.h>
 #endif
 
diff --git a/src/dap_traffic_track.c b/src/dap_traffic_track.c
index 872e3616e34b5286aeffb57fc6a26a3ea93778af..7b7ccb72203b21b2e29c50728b3b1350e17a2bcd 100755
--- a/src/dap_traffic_track.c
+++ b/src/dap_traffic_track.c
@@ -32,14 +32,11 @@
 #include <pthread.h>
 #include <ev.h>
 #else
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0600
 #include <winsock2.h>
 #include <windows.h>
 #include <mswsock.h>
 #include <ws2tcpip.h>
 #include <io.h>
-#include <wepoll.h>
 #include <pthread.h>
 #endif