2021-04-10 14:31:21 +00:00
|
|
|
From 6216a5dd04b5722cae21ba57ac4747f402d6d11a Mon Sep 17 00:00:00 2001
|
2020-08-21 10:18:02 +00:00
|
|
|
From: Ariadne Conill <ariadne@dereferenced.org>
|
|
|
|
Date: Fri, 21 Aug 2020 06:58:22 +0000
|
2021-04-10 14:31:21 +00:00
|
|
|
Subject: [PATCH 17/40] dlang: fix fcntl on mips, add libucontext dep
|
2020-08-21 10:18:02 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
libphobos/configure.tgt | 1 +
|
|
|
|
libphobos/libdruntime/core/sys/posix/fcntl.d | 15 +++++++++++++++
|
|
|
|
2 files changed, 16 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt
|
|
|
|
index 94e42bf5509..73f2e4b7f01 100644
|
|
|
|
--- a/libphobos/configure.tgt
|
|
|
|
+++ b/libphobos/configure.tgt
|
|
|
|
@@ -35,6 +35,7 @@ case "${target}" in
|
|
|
|
;;
|
|
|
|
mips*-*-linux*)
|
|
|
|
LIBPHOBOS_SUPPORTED=yes
|
|
|
|
+ LIBDRUNTIME_NEEDS_UCONTEXT=yes
|
|
|
|
;;
|
|
|
|
power*-*-linux*)
|
|
|
|
LIBPHOBOS_SUPPORTED=yes
|
|
|
|
diff --git a/libphobos/libdruntime/core/sys/posix/fcntl.d b/libphobos/libdruntime/core/sys/posix/fcntl.d
|
|
|
|
index 9febcff849b..cb34e2108bd 100644
|
|
|
|
--- a/libphobos/libdruntime/core/sys/posix/fcntl.d
|
|
|
|
+++ b/libphobos/libdruntime/core/sys/posix/fcntl.d
|
|
|
|
@@ -870,6 +870,21 @@ else version (CRuntime_Musl)
|
|
|
|
F_SETLKW = 7,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+ else version (MIPS_Any)
|
|
|
|
+ {
|
|
|
|
+ enum
|
|
|
|
+ {
|
|
|
|
+ O_DIRECTORY = 0x010000, // octal 0200000
|
|
|
|
+ O_NOFOLLOW = 0x020000, // octal 0400000
|
|
|
|
+ O_DIRECT = 0x008000, // octal 0100000
|
|
|
|
+ O_LARGEFILE = 0x002000, // octal 0020000
|
|
|
|
+ O_TMPFILE = 0x410000, // octal 020200000
|
|
|
|
+
|
|
|
|
+ F_GETLK = 33,
|
|
|
|
+ F_SETLK = 34,
|
|
|
|
+ F_SETLKW = 35,
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
else
|
|
|
|
static assert(0, "Platform not supported");
|
|
|
|
|
|
|
|
--
|
2021-03-28 18:49:36 +00:00
|
|
|
2.31.0
|
2020-08-21 10:18:02 +00:00
|
|
|
|