pmaports/cross/gcc-armv7/0033-libphobos-do-not-use-LFS64-symbols.patch
2023-07-25 22:19:00 +02:00

44 lines
1.8 KiB
Diff

From b71d21b87e6946c763edad5e420bf22d8a453077 Mon Sep 17 00:00:00 2001
From: psykose <alice@ayaya.dev>
Date: Mon, 29 May 2023 15:33:11 +0000
Subject: [PATCH 33/35] libphobos: do not use LFS64 symbols
musl does not have these since 1.2.4, we can't use the compat interfaces.
---
libphobos/libdruntime/core/sys/posix/config.d | 2 +-
libphobos/libdruntime/core/sys/posix/sys/mman.d | 6 +-----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/libphobos/libdruntime/core/sys/posix/config.d b/libphobos/libdruntime/core/sys/posix/config.d
index ae6752f220e..6b80d1ff0e6 100644
--- a/libphobos/libdruntime/core/sys/posix/config.d
+++ b/libphobos/libdruntime/core/sys/posix/config.d
@@ -88,7 +88,7 @@ else version (CRuntime_Musl)
enum __REDIRECT = false;
// Those three are irrelevant for Musl as it always uses 64 bits off_t
- enum __USE_FILE_OFFSET64 = _FILE_OFFSET_BITS == 64;
+ enum __USE_FILE_OFFSET64 = false;
enum __USE_LARGEFILE = __USE_FILE_OFFSET64 && !__REDIRECT;
enum __USE_LARGEFILE64 = __USE_FILE_OFFSET64 && !__REDIRECT;
diff --git a/libphobos/libdruntime/core/sys/posix/sys/mman.d b/libphobos/libdruntime/core/sys/posix/sys/mman.d
index 0d3d517d69a..323aa0af72d 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/mman.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/mman.d
@@ -293,11 +293,7 @@ else version (CRuntime_Bionic)
}
else version (CRuntime_Musl)
{
- static if (__USE_LARGEFILE64) void* mmap64(void*, size_t, int, int, int, off_t);
- static if (__USE_FILE_OFFSET64)
- alias mmap = mmap64;
- else
- void* mmap(void*, size_t, int, int, int, off_t);
+ void* mmap(void*, size_t, int, int, int, off_t);
int munmap(void*, size_t);
}
else version (CRuntime_UClibc)
--
2.41.0