mirror of
https://github.com/libretro/citra.git
synced 2026-11-07 10:16:01 -10:00
libretro: fix stat64 default in newer gcc
This commit is contained in:
1 parent
cc25b9b9f9
commit
ae9724ead5
1 file changed
+13
@@ -143,7 +143,11 @@ bool Exists(const std::string& filename) {
|
||||
StripTailDirSlashes(copy);
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
|
||||
struct _stat64 file_info;
|
||||
#else
|
||||
struct stat file_info;
|
||||
#endif
|
||||
// Windows needs a slash to identify a driver root
|
||||
if (copy.size() != 0 && copy.back() == ':')
|
||||
copy += DIR_SEP_CHR;
|
||||
@@ -164,7 +168,11 @@ bool IsDirectory(const std::string& filename) {
|
||||
return AndroidStorage::IsDirectory(filename);
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && (_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
|
||||
struct _stat64 file_info;
|
||||
#else
|
||||
struct stat file_info;
|
||||
#endif
|
||||
|
||||
std::string copy(filename);
|
||||
StripTailDirSlashes(copy);
|
||||
@@ -416,7 +424,12 @@ u64 GetSize(const std::string& filename) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(_WIN32) && (_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
|
||||
struct _stat64 buf;
|
||||
#else
|
||||
struct stat buf;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
if (_wstat64(Common::UTF8ToUTF16W(filename).c_str(), &buf) == 0)
|
||||
#elif defined(ANDROID) && !defined(HAVE_LIBRETRO_VFS)
|
||||
|
||||
Reference in new issue
Block a user