diff --git a/Core/Core.vcxproj b/Core/Core.vcxproj
index 812edac4e3..68e918a7f0 100644
--- a/Core/Core.vcxproj
+++ b/Core/Core.vcxproj
@@ -1041,6 +1041,7 @@
+
diff --git a/Core/Core.vcxproj.filters b/Core/Core.vcxproj.filters
index 72e0aa5e5d..c6a59d5d51 100644
--- a/Core/Core.vcxproj.filters
+++ b/Core/Core.vcxproj.filters
@@ -1883,6 +1883,9 @@
Ext\libzip
+
+ Ext\libzip
+
diff --git a/ext/libzip/config.h b/ext/libzip/config.h
index 08123091e7..a5d26ea015 100644
--- a/ext/libzip/config.h
+++ b/ext/libzip/config.h
@@ -3,6 +3,14 @@
#ifndef _HAD_ZIPCONF_H
#include "zipconf.h"
#endif
+
+#if defined(WINAPI_FAMILY) && defined(WINAPI_FAMILY_PARTITION)
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP
+#define MS_UWP
+#define _WIN32_WINNT 0x0602
+#endif
+#endif
+
/* BEGIN DEFINES */
#ifdef _WIN32
#define HAVE__CLOSE
@@ -17,10 +25,12 @@
#define HAVE__UMASK
#define HAVE__UNLINK
#endif
+#ifndef MS_UWP
#define HAVE_FILENO
#define HAVE_FSEEKO
#define HAVE_FTELLO
#define HAVE_GETPROGNAME
+#endif
#ifndef _WIN32
#define HAVE_LOCALTIME_R
#define HAVE_MKSTEMP 1
diff --git a/ext/libzip/zip_random_uwp.c b/ext/libzip/zip_random_uwp.c
index f83c78fd3a..70c998cfa4 100644
--- a/ext/libzip/zip_random_uwp.c
+++ b/ext/libzip/zip_random_uwp.c
@@ -39,9 +39,9 @@
#ifndef HAVE_SECURE_RANDOM
-#include
#include
#include
+#include
ZIP_EXTERN bool
zip_secure_random(zip_uint8_t *buffer, zip_uint16_t length) {
diff --git a/ext/libzip/zip_source_file_win32_utf16.c b/ext/libzip/zip_source_file_win32_utf16.c
index 3fa0aa10e6..0d90d9becf 100644
--- a/ext/libzip/zip_source_file_win32_utf16.c
+++ b/ext/libzip/zip_source_file_win32_utf16.c
@@ -81,6 +81,7 @@ utf16_allocate_tempname(const char *name, size_t extra_chars, size_t *lengthp) {
static HANDLE __stdcall
utf16_create_file(const char *name, DWORD access, DWORD share_mode, PSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD file_attributes, HANDLE template_file) {
#ifdef MS_UWP
+#if 0
CREATEFILE2_EXTENDED_PARAMETERS extParams = {0};
extParams.dwFileAttributes = file_attributes;
extParams.dwFileFlags = FILE_FLAG_RANDOM_ACCESS;
@@ -88,8 +89,11 @@ utf16_create_file(const char *name, DWORD access, DWORD share_mode, PSECURITY_AT
extParams.dwSize = sizeof(extParams);
extParams.hTemplateFile = template_file;
extParams.lpSecurityAttributes = security_attributes;
-
+
return CreateFile2((const wchar_t *)name, access, share_mode, creation_disposition, &extParams);
+#else
+ return CreateFile2((const wchar_t *)name, access, share_mode, creation_disposition, NULL);
+#endif
#else
return CreateFileW((const wchar_t *)name, access, share_mode, security_attributes, creation_disposition, file_attributes, template_file);
#endif