aports/community/imhex/fix-lfs64.patch
Celeste 28992fb800 community/imhex: move from testing
also, add llvm-gtest to makedepends to provide
libLLVMTestingAnnotations.a needed by LLVMExports.cmake
2023-11-07 11:57:49 +00:00

102 lines
3.2 KiB
Diff

--- a/lib/external/libwolv/libs/io/source/io/file.cpp
+++ b/lib/external/libwolv/libs/io/source/io/file.cpp
@@ -89,7 +89,7 @@
}
void File::seek(u64 offset) {
- fseeko64(this->m_file, offset, SEEK_SET);
+ fseeko(this->m_file, offset, SEEK_SET);
}
void File::close() {
@@ -221,7 +221,7 @@
void File::setSize(u64 size) {
if (!isValid()) return;
- auto result = ftruncate64(fileno(this->m_file), size);
+ auto result = ftruncate(fileno(this->m_file), size);
util::unused(result);
this->updateSize();
}
@@ -232,10 +232,10 @@
return;
}
- auto startPos = ftello64(this->m_file);
- fseeko64(this->m_file, 0, SEEK_END);
- auto size = ftello64(this->m_file);
- fseeko64(this->m_file, startPos, SEEK_SET);
+ auto startPos = ftello(this->m_file);
+ fseeko(this->m_file, 0, SEEK_END);
+ auto size = ftello(this->m_file);
+ fseeko(this->m_file, startPos, SEEK_SET);
if (this->m_map != nullptr && size != this->m_fileSize) {
this->unmap();
--- a/lib/external/miniaudio/include/miniaudio.h
+++ b/lib/external/miniaudio/include/miniaudio.h
@@ -13075,15 +13075,7 @@
return ma_result_from_errno(err);
}
#else
-#if defined(_WIN32) || defined(__APPLE__)
*ppFile = fopen(pFilePath, pOpenMode);
-#else
- #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && defined(_LARGEFILE64_SOURCE)
- *ppFile = fopen64(pFilePath, pOpenMode);
- #else
- *ppFile = fopen(pFilePath, pOpenMode);
- #endif
-#endif
if (*ppFile == NULL) {
ma_result result = ma_result_from_errno(errno);
if (result == MA_SUCCESS) {
--- a/lib/external/pattern_language/external/libwolv/libs/io/source/io/file.cpp
+++ b/lib/external/pattern_language/external/libwolv/libs/io/source/io/file.cpp
@@ -89,7 +89,7 @@
}
void File::seek(u64 offset) {
- fseeko64(this->m_file, offset, SEEK_SET);
+ fseeko(this->m_file, offset, SEEK_SET);
}
void File::close() {
@@ -221,7 +221,7 @@
void File::setSize(u64 size) {
if (!isValid()) return;
- auto result = ftruncate64(fileno(this->m_file), size);
+ auto result = ftruncate(fileno(this->m_file), size);
util::unused(result);
this->updateSize();
}
@@ -232,10 +232,10 @@
return;
}
- auto startPos = ftello64(this->m_file);
- fseeko64(this->m_file, 0, SEEK_END);
- auto size = ftello64(this->m_file);
- fseeko64(this->m_file, startPos, SEEK_SET);
+ auto startPos = ftello(this->m_file);
+ fseeko(this->m_file, 0, SEEK_END);
+ auto size = ftello(this->m_file);
+ fseeko(this->m_file, startPos, SEEK_SET);
if (this->m_map != nullptr && size != this->m_fileSize) {
this->unmap();
--- a/plugins/builtin/source/content/providers/disk_provider.cpp
+++ b/plugins/builtin/source/content/providers/disk_provider.cpp
@@ -33,10 +33,6 @@
#include <sys/disk.h>
#endif
-#if defined(OS_LINUX)
-#define lseek lseek64
-#endif
-
namespace hex::plugin::builtin {
DiskProvider::DiskProvider() : Provider() {