Fix build error on UWP (#896)

For x64-uwp, size_t is 64-bit, DWORD is 32-bit.
When /WX compiler option is specified, error occurs.
This commit is contained in:
myd7349 2020-05-25 21:49:24 +08:00 committed by GitHub
parent 12150baa5e
commit ac0c3093f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -339,7 +339,13 @@ static void dirent_set_errno(int error);
*/
static _WDIR *_wopendir(const wchar_t *dirname) {
_WDIR *dirp;
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
/* Desktop */
DWORD n;
#else
/* WinRT */
size_t n;
#endif
wchar_t *p;
/* Must have directory name */