Skip to content

Commit eb869c6

Browse files
committed
kodi: rebuild for fmt-12
1 parent 355b901 commit eb869c6

File tree

4 files changed

+188
-1
lines changed

4 files changed

+188
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/xbmc/filesystem/CurlFile.cpp
2+
+++ b/xbmc/filesystem/CurlFile.cpp
3+
@@ -44,7 +44,7 @@ using namespace std::chrono_literals;
4+
5+
#define FITS_INT(a) (((a) <= INT_MAX) && ((a) >= INT_MIN))
6+
7+
-curl_proxytype proxyType2CUrlProxyType[] = {
8+
+long proxyType2CUrlProxyType[] = {
9+
CURLPROXY_HTTP, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A,
10+
CURLPROXY_SOCKS5, CURLPROXY_SOCKS5_HOSTNAME, CURLPROXY_HTTPS,
11+
};
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
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+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From da89dfce2da4c68ef3a7f89a4fba1cd6f861e363 Mon Sep 17 00:00:00 2001
2+
From: fossdd <[email protected]>
3+
Date: Sat, 22 Feb 2025 22:52:11 +0100
4+
Subject: [PATCH] [UDMABufferObject] Use sysconf(_SC_PAGESIZE) to retrieve page
5+
size
6+
7+
getpagesize() is deprecated and legacy since POSIX.1-2001 and is not available
8+
on architectures where PAGESIZE is not defined. Instead query the
9+
current page size at runtime.
10+
---
11+
xbmc/utils/UDMABufferObject.cpp | 4 +---
12+
1 file changed, 1 insertion(+), 3 deletions(-)
13+
14+
diff --git a/xbmc/utils/UDMABufferObject.cpp b/xbmc/utils/UDMABufferObject.cpp
15+
index 2b8336bcea9c8..f6ba81c18f721 100644
16+
--- a/xbmc/utils/UDMABufferObject.cpp
17+
+++ b/xbmc/utils/UDMABufferObject.cpp
18+
@@ -23,8 +23,6 @@
19+
namespace
20+
{
21+
22+
-const auto PAGESIZE = getpagesize();
23+
-
24+
int RoundUp(int num, int factor)
25+
{
26+
return num + factor - 1 - (num - 1) % factor;
27+
@@ -93,7 +91,7 @@ bool CUDMABufferObject::CreateBufferObject(uint32_t format, uint32_t width, uint
28+
bool CUDMABufferObject::CreateBufferObject(uint64_t size)
29+
{
30+
// Must be rounded to the system page size
31+
- m_size = RoundUp(size, PAGESIZE);
32+
+ m_size = RoundUp(size, sysconf(_SC_PAGESIZE));
33+
34+
m_memfd = memfd_create("kodi", MFD_CLOEXEC | MFD_ALLOW_SEALING);
35+
if (m_memfd < 0)

srcpkgs/kodi/template

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Template file for 'kodi'
22
pkgname=kodi
33
version=21.2
4-
revision=1
4+
revision=2
55
_codename="Omega"
66
_crossguid_ver="ca1bf4b810e2d188d04cb6286f957008ee1b7681"
77
_dvdcss_ver="1.4.3-Next-Nexus-Alpha2-2"
@@ -98,6 +98,7 @@ _gtest_filter+=":TestWebServer.CanGetRangedFileRangeFirst_Second"
9898
_gtest_filter+=":TestWebServer.CanGetRangedFileRange_Last"
9999
_gtest_filter+=":TestWebServer.CanGetRangedFileRangeFirstSecond"
100100
_gtest_filter+=":TestWebServer.CanGetRangedFileRangeFirstSecondLast"
101+
_gtest_filter+=":TestNetwork.PingHost"
101102

102103
case "$XBPS_TARGET_MACHINE" in
103104
i686)

0 commit comments

Comments
 (0)