mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 07:33:46 +01:00
windows support: fix _wstat misusage
I have no idea when or how this broke, but _wstati64() is the function we want anyway (64 bit filesize). Possibly this was a mingw-w64 bug. It's unknown why "wstat()" just doesn't work in this case, as it's not defined by MSDN and could be defined by mingw as it needs.
This commit is contained in:
parent
41dbf07fc5
commit
cbdee50f29
@ -87,7 +87,7 @@ void mp_get_converted_argv(int *argc, char ***argv)
|
||||
int mp_stat(const char *path, struct stat *buf)
|
||||
{
|
||||
wchar_t *wpath = mp_from_utf8(NULL, path);
|
||||
int res = _wstat64(wpath, buf);
|
||||
int res = _wstati64(wpath, buf);
|
||||
talloc_free(wpath);
|
||||
return res;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ struct dirent *mp_readdir(DIR *dir);
|
||||
int mp_closedir(DIR *dir);
|
||||
int mp_mkdir(const char *path, int mode);
|
||||
|
||||
// NOTE: Stat is not overridden with mp_stat, because MinGW-w64 defines it as
|
||||
// NOTE: stat is not overridden with mp_stat, because MinGW-w64 defines it as
|
||||
// macro.
|
||||
|
||||
#define printf(...) mp_printf(__VA_ARGS__)
|
||||
|
Loading…
Reference in New Issue
Block a user