aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/401-dlang-32bits.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/gcc/401-dlang-32bits.patch')
-rw-r--r--main/gcc/401-dlang-32bits.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/main/gcc/401-dlang-32bits.patch b/main/gcc/401-dlang-32bits.patch
new file mode 100644
index 0000000000..6072546f7b
--- /dev/null
+++ b/main/gcc/401-dlang-32bits.patch
@@ -0,0 +1,25 @@
+--- a/libphobos/libdruntime/core/sys/posix/config.d 2019-10-29 15:54:05.000000000 +0900
++++ b/libphobos/libdruntime/core/sys/posix/config.d 2019-10-29 15:54:08.000000000 +0900
+@@ -67,15 +67,21 @@ version (CRuntime_Glibc)
+ }
+ else version (CRuntime_Musl)
+ {
++ // off_t is always 64 bits on Musl
+ enum _FILE_OFFSET_BITS = 64;
+
++ // Not present in Musl sources
+ 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_LARGEFILE = __USE_FILE_OFFSET64 && !__REDIRECT;
+ enum __USE_LARGEFILE64 = __USE_FILE_OFFSET64 && !__REDIRECT;
+
+- enum __WORDSIZE=64;
++ version (D_LP64)
++ enum __WORDSIZE = 64;
++ else
++ enum __WORDSIZE = 32;
+ }
+ else version (CRuntime_UClibc)
+ {