0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch (1621B)
1 From 76c7eb27b9dfe96f2f1db4fa6f29ce28715ad2a4 Mon Sep 17 00:00:00 2001 2 From: Ariadne Conill <ariadne@dereferenced.org> 3 Date: Fri, 21 Aug 2020 06:58:22 +0000 4 Subject: [PATCH] dlang: fix fcntl on mips, add libucontext dep 5 6 --- 7 libphobos/configure.tgt | 1 + 8 libphobos/libdruntime/core/sys/posix/fcntl.d | 15 +++++++++++++++ 9 2 files changed, 16 insertions(+) 10 11 diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt 12 index 94e42bf5509..73f2e4b7f01 100644 13 --- a/libphobos/configure.tgt 14 +++ b/libphobos/configure.tgt 15 @@ -35,6 +35,7 @@ case "${target}" in 16 ;; 17 mips*-*-linux*) 18 LIBPHOBOS_SUPPORTED=yes 19 + LIBDRUNTIME_NEEDS_UCONTEXT=yes 20 ;; 21 power*-*-linux*) 22 LIBPHOBOS_SUPPORTED=yes 23 diff --git a/libphobos/libdruntime/core/sys/posix/fcntl.d b/libphobos/libdruntime/core/sys/posix/fcntl.d 24 index 9febcff849b..cb34e2108bd 100644 25 --- a/libphobos/libdruntime/core/sys/posix/fcntl.d 26 +++ b/libphobos/libdruntime/core/sys/posix/fcntl.d 27 @@ -870,6 +870,21 @@ else version (CRuntime_Musl) 28 F_SETLKW = 7, 29 } 30 } 31 + else version (MIPS_Any) 32 + { 33 + enum 34 + { 35 + O_DIRECTORY = 0x010000, // octal 0200000 36 + O_NOFOLLOW = 0x020000, // octal 0400000 37 + O_DIRECT = 0x008000, // octal 0100000 38 + O_LARGEFILE = 0x002000, // octal 0020000 39 + O_TMPFILE = 0x410000, // octal 020200000 40 + 41 + F_GETLK = 33, 42 + F_SETLK = 34, 43 + F_SETLKW = 35, 44 + } 45 + } 46 else 47 static assert(0, "Platform not supported"); 48 49 -- 50 2.31.1 51