|
| 1 | +--- a/xbmc/platform/posix/PlatformDefs.h |
| 2 | ++++ b/xbmc/platform/posix/PlatformDefs.h |
| 3 | +@@ -114,7 +114,7 @@ |
| 4 | + #define statfs64 statfs |
| 5 | + #endif |
| 6 | + #else |
| 7 | +- #define __stat64 stat64 |
| 8 | ++ #define __stat64 stat |
| 9 | + #endif |
| 10 | + |
| 11 | + struct _stati64 { |
| 12 | +--- a/xbmc/platform/posix/XHandle.h |
| 13 | ++++ b/xbmc/platform/posix/XHandle.h |
| 14 | +@@ -44,7 +44,7 @@ |
| 15 | + std::vector<std::string> m_FindFileResults; |
| 16 | + int m_nFindFileIterator; |
| 17 | + std::string m_FindFileDir; |
| 18 | +- off64_t m_iOffset; |
| 19 | ++ off_t m_iOffset; |
| 20 | + bool m_bCDROM; |
| 21 | + bool m_bEventSet; |
| 22 | + int m_nRefCount; |
| 23 | +--- a/xbmc/platform/posix/Filesystem.cpp |
| 24 | ++++ b/xbmc/platform/posix/Filesystem.cpp |
| 25 | +@@ -37,8 +37,8 @@ |
| 26 | + ec.clear(); |
| 27 | + space_info sp; |
| 28 | + #if defined(TARGET_LINUX) |
| 29 | +- struct statvfs64 fsInfo; |
| 30 | +- auto result = statvfs64(CSpecialProtocol::TranslatePath(path).c_str(), &fsInfo); |
| 31 | ++ struct statvfs fsInfo; |
| 32 | ++ auto result = statvfs(CSpecialProtocol::TranslatePath(path).c_str(), &fsInfo); |
| 33 | + #else |
| 34 | + struct statfs fsInfo; |
| 35 | + // is 64-bit on android and darwin (10.6SDK + any iOS) |
| 36 | +--- a/xbmc/platform/posix/filesystem/PosixFile.cpp |
| 37 | ++++ b/xbmc/platform/posix/filesystem/PosixFile.cpp |
| 38 | +@@ -211,8 +211,8 @@ |
| 39 | + if (m_fd < 0) |
| 40 | + return -1; |
| 41 | + |
| 42 | +- struct stat64 st; |
| 43 | +- if (fstat64(m_fd, &st) != 0) |
| 44 | ++ struct stat st; |
| 45 | ++ if (fstat(m_fd, &st) != 0) |
| 46 | + return -1; |
| 47 | + |
| 48 | + return st.st_size; |
| 49 | +@@ -327,8 +327,8 @@ |
| 50 | + if (filename.empty()) |
| 51 | + return false; |
| 52 | + |
| 53 | +- struct stat64 st; |
| 54 | +- return stat64(filename.c_str(), &st) == 0 && !S_ISDIR(st.st_mode); |
| 55 | ++ struct stat st; |
| 56 | ++ return stat(filename.c_str(), &st) == 0 && !S_ISDIR(st.st_mode); |
| 57 | + } |
| 58 | + |
| 59 | + int CPosixFile::Stat(const CURL& url, struct __stat64* buffer) |
| 60 | +@@ -374,7 +374,7 @@ |
| 61 | + } |
| 62 | + return ret; |
| 63 | + #else |
| 64 | +- return stat64(filename.c_str(), buffer); |
| 65 | ++ return stat(filename.c_str(), buffer); |
| 66 | + #endif |
| 67 | + } |
| 68 | + |
| 69 | +@@ -384,5 +384,5 @@ |
| 70 | + if (m_fd < 0 || !buffer) |
| 71 | + return -1; |
| 72 | + |
| 73 | +- return fstat64(m_fd, buffer); |
| 74 | ++ return fstat(m_fd, buffer); |
| 75 | + } |
| 76 | +--- a/xbmc/guilib/XBTFReader.cpp |
| 77 | ++++ b/xbmc/guilib/XBTFReader.cpp |
| 78 | +@@ -205,7 +205,7 @@ |
| 79 | + #elif defined(TARGET_ANDROID) |
| 80 | + if (fseek(m_file, static_cast<long>(frame.GetOffset()), SEEK_SET) == -1) // No fseeko64 before N |
| 81 | + #else |
| 82 | +- if (fseeko64(m_file, static_cast<off_t>(frame.GetOffset()), SEEK_SET) == -1) |
| 83 | ++ if (fseeko(m_file, static_cast<off_t>(frame.GetOffset()), SEEK_SET) == -1) |
| 84 | + #endif |
| 85 | + return false; |
| 86 | + |
| 87 | +--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp |
| 88 | ++++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp |
| 89 | +@@ -633,7 +633,7 @@ extern "C" |
| 90 | + #if defined(TARGET_WINDOWS) |
| 91 | + return _fstat64(fd, buf); |
| 92 | + #else |
| 93 | +- return fstat64(fd, buf); |
| 94 | ++ return fstat(fd, buf); |
| 95 | + #endif |
| 96 | + CLog::Log(LOGERROR, "{} emulated function failed", __FUNCTION__); |
| 97 | + return -1; |
| 98 | +@@ -1231,7 +1231,7 @@ extern "C" |
| 99 | + return EOF; |
| 100 | + } |
| 101 | + |
| 102 | +- int dll_fseek64(FILE* stream, off64_t offset, int origin) |
| 103 | ++ int dll_fseek64(FILE* stream, off_t offset, int origin) |
| 104 | + { |
| 105 | + int fd = g_emuFileWrapper.GetDescriptorByStream(stream); |
| 106 | + if (fd >= 0) |
| 107 | +@@ -1284,12 +1284,12 @@ extern "C" |
| 108 | + return (long)dll_ftell64(stream); |
| 109 | + } |
| 110 | + |
| 111 | +- off64_t dll_ftell64(FILE *stream) |
| 112 | ++ off_t dll_ftell64(FILE *stream) |
| 113 | + { |
| 114 | + CFile* pFile = g_emuFileWrapper.GetFileXbmcByStream(stream); |
| 115 | + if (pFile != NULL) |
| 116 | + { |
| 117 | +- return (off64_t)pFile->GetPosition(); |
| 118 | ++ return (off_t)pFile->GetPosition(); |
| 119 | + } |
| 120 | + CLog::Log(LOGERROR, "{} emulated function failed", __FUNCTION__); |
| 121 | + return -1; |
| 122 | +@@ -1334,7 +1334,7 @@ extern "C" |
| 123 | + #elif defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) |
| 124 | + return lseek(fd, 0, SEEK_CUR); |
| 125 | + #else |
| 126 | +- return lseek64(fd, 0, SEEK_CUR); |
| 127 | ++ return lseek(fd, 0, SEEK_CUR); |
| 128 | + #endif |
| 129 | + } |
| 130 | + CLog::Log(LOGERROR, "{} emulated function failed", __FUNCTION__); |
| 131 | +@@ -1548,7 +1548,7 @@ extern "C" |
| 132 | + #if !defined(__GLIBC__) || !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) |
| 133 | + tmpPos= *pos; |
| 134 | + #else |
| 135 | +- tmpPos.__pos = (off64_t)(pos->__pos); |
| 136 | ++ tmpPos.__pos = (off_t)(pos->__pos); |
| 137 | + #endif |
| 138 | + return dll_fsetpos64(stream, &tmpPos); |
| 139 | + } |
| 140 | + |
0 commit comments