1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 19:29:53 +03:00
aports/community/kodi/lfs64.patch

139 lines
4 KiB
Diff

--- a/xbmc/platform/posix/PlatformDefs.h
+++ b/xbmc/platform/posix/PlatformDefs.h
@@ -114,7 +114,7 @@
#define statfs64 statfs
#endif
#else
- #define __stat64 stat64
+ #define __stat64 stat
#endif
struct _stati64 {
--- a/xbmc/platform/posix/XHandle.h
+++ b/xbmc/platform/posix/XHandle.h
@@ -44,7 +44,7 @@
std::vector<std::string> m_FindFileResults;
int m_nFindFileIterator;
std::string m_FindFileDir;
- off64_t m_iOffset;
+ off_t m_iOffset;
bool m_bCDROM;
bool m_bEventSet;
int m_nRefCount;
--- a/xbmc/platform/posix/Filesystem.cpp
+++ b/xbmc/platform/posix/Filesystem.cpp
@@ -37,8 +37,8 @@
ec.clear();
space_info sp;
#if defined(TARGET_LINUX)
- struct statvfs64 fsInfo;
- auto result = statvfs64(CSpecialProtocol::TranslatePath(path).c_str(), &fsInfo);
+ struct statvfs fsInfo;
+ auto result = statvfs(CSpecialProtocol::TranslatePath(path).c_str(), &fsInfo);
#else
struct statfs fsInfo;
// is 64-bit on android and darwin (10.6SDK + any iOS)
--- a/xbmc/platform/posix/filesystem/PosixFile.cpp
+++ b/xbmc/platform/posix/filesystem/PosixFile.cpp
@@ -211,8 +211,8 @@
if (m_fd < 0)
return -1;
- struct stat64 st;
- if (fstat64(m_fd, &st) != 0)
+ struct stat st;
+ if (fstat(m_fd, &st) != 0)
return -1;
return st.st_size;
@@ -327,8 +327,8 @@
if (filename.empty())
return false;
- struct stat64 st;
- return stat64(filename.c_str(), &st) == 0 && !S_ISDIR(st.st_mode);
+ struct stat st;
+ return stat(filename.c_str(), &st) == 0 && !S_ISDIR(st.st_mode);
}
int CPosixFile::Stat(const CURL& url, struct __stat64* buffer)
@@ -374,7 +374,7 @@
}
return ret;
#else
- return stat64(filename.c_str(), buffer);
+ return stat(filename.c_str(), buffer);
#endif
}
@@ -384,5 +384,5 @@
if (m_fd < 0 || !buffer)
return -1;
- return fstat64(m_fd, buffer);
+ return fstat(m_fd, buffer);
}
--- a/xbmc/guilib/XBTFReader.cpp
+++ b/xbmc/guilib/XBTFReader.cpp
@@ -205,7 +205,7 @@
#elif defined(TARGET_ANDROID)
if (fseek(m_file, static_cast<long>(frame.GetOffset()), SEEK_SET) == -1) // No fseeko64 before N
#else
- if (fseeko64(m_file, static_cast<off_t>(frame.GetOffset()), SEEK_SET) == -1)
+ if (fseeko(m_file, static_cast<off_t>(frame.GetOffset()), SEEK_SET) == -1)
#endif
return false;
--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
+++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
@@ -633,7 +633,7 @@ extern "C"
#if defined(TARGET_WINDOWS)
return _fstat64(fd, buf);
#else
- return fstat64(fd, buf);
+ return fstat(fd, buf);
#endif
CLog::Log(LOGERROR, "{} emulated function failed", __FUNCTION__);
return -1;
@@ -1231,7 +1231,7 @@ extern "C"
return EOF;
}
- int dll_fseek64(FILE* stream, off64_t offset, int origin)
+ int dll_fseek64(FILE* stream, off_t offset, int origin)
{
int fd = g_emuFileWrapper.GetDescriptorByStream(stream);
if (fd >= 0)
@@ -1284,12 +1284,12 @@ extern "C"
return (long)dll_ftell64(stream);
}
- off64_t dll_ftell64(FILE *stream)
+ off_t dll_ftell64(FILE *stream)
{
CFile* pFile = g_emuFileWrapper.GetFileXbmcByStream(stream);
if (pFile != NULL)
{
- return (off64_t)pFile->GetPosition();
+ return (off_t)pFile->GetPosition();
}
CLog::Log(LOGERROR, "{} emulated function failed", __FUNCTION__);
return -1;
@@ -1334,7 +1334,7 @@ extern "C"
#elif defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
return lseek(fd, 0, SEEK_CUR);
#else
- return lseek64(fd, 0, SEEK_CUR);
+ return lseek(fd, 0, SEEK_CUR);
#endif
}
CLog::Log(LOGERROR, "{} emulated function failed", __FUNCTION__);
@@ -1548,7 +1548,7 @@ extern "C"
#if !defined(__GLIBC__) || !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
tmpPos= *pos;
#else
- tmpPos.__pos = (off64_t)(pos->__pos);
+ tmpPos.__pos = (off_t)(pos->__pos);
#endif
return dll_fsetpos64(stream, &tmpPos);
}