summaryrefslogtreecommitdiff
path: root/thirdparty/libwebsockets/uwp_fixes.diff
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-07-01 18:14:26 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-07-04 15:03:04 +0200
commitaae6c075aa500abdb9c72fea9bbb85cb4e735e65 (patch)
tree1c2055b447ca44df399ea30645c6162df7b2f95e /thirdparty/libwebsockets/uwp_fixes.diff
parent9e303ef71ce18ffd01ed7a63badf59ea015089c7 (diff)
Remove libwebsocket. No longer used, yay!
Diffstat (limited to 'thirdparty/libwebsockets/uwp_fixes.diff')
-rw-r--r--thirdparty/libwebsockets/uwp_fixes.diff47
1 files changed, 0 insertions, 47 deletions
diff --git a/thirdparty/libwebsockets/uwp_fixes.diff b/thirdparty/libwebsockets/uwp_fixes.diff
deleted file mode 100644
index 21c3275bba..0000000000
--- a/thirdparty/libwebsockets/uwp_fixes.diff
+++ /dev/null
@@ -1,47 +0,0 @@
-diff --git a/thirdparty/libwebsockets/plat/lws-plat-win.c b/thirdparty/libwebsockets/plat/lws-plat-win.c
-index bd513b494..1850b6425 100644
---- a/thirdparty/libwebsockets/plat/lws-plat-win.c
-+++ b/thirdparty/libwebsockets/plat/lws-plat-win.c
-@@ -641,9 +641,20 @@ _lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
- HANDLE ret;
- WCHAR buf[MAX_PATH];
- lws_fop_fd_t fop_fd;
-- LARGE_INTEGER llFileSize = {0};
-+ FILE_STANDARD_INFO fInfo = {0};
-
- MultiByteToWideChar(CP_UTF8, 0, filename, -1, buf, LWS_ARRAY_SIZE(buf));
-+
-+#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0602 // Windows 8 (minimum when UWP_ENABLED, but can be used in Windows builds)
-+ CREATEFILE2_EXTENDED_PARAMETERS extParams = {0};
-+ extParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
-+
-+ if (((*flags) & 7) == _O_RDONLY) {
-+ ret = CreateFile2(buf, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, &extParams);
-+ } else {
-+ ret = CreateFile2(buf, GENERIC_WRITE, 0, CREATE_ALWAYS, &extParams);
-+ }
-+#else
- if (((*flags) & 7) == _O_RDONLY) {
- ret = CreateFileW(buf, GENERIC_READ, FILE_SHARE_READ,
- NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-@@ -651,6 +662,7 @@ _lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
- ret = CreateFileW(buf, GENERIC_WRITE, 0, NULL,
- CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- }
-+#endif
-
- if (ret == LWS_INVALID_FILE)
- goto bail;
-@@ -663,9 +675,9 @@ _lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
- fop_fd->fd = ret;
- fop_fd->filesystem_priv = NULL; /* we don't use it */
- fop_fd->flags = *flags;
-- fop_fd->len = GetFileSize(ret, NULL);
-- if(GetFileSizeEx(ret, &llFileSize))
-- fop_fd->len = llFileSize.QuadPart;
-+ fop_fd->len = 0;
-+ if(GetFileInformationByHandleEx(ret, FileStandardInfo, &fInfo, sizeof(fInfo)))
-+ fop_fd->len = fInfo.EndOfFile.QuadPart;
-
- fop_fd->pos = 0;
-