projects/guix·blob javascript-team · refs

66 lines · 2.5 KiB

1Upstream-status: https://github.com/dlang/phobos/pull/10980
2
3From e2d65597896089a8bd06992a4b83e3d14176b02c Mon Sep 17 00:00:00 2001
4From: Yelninei <[email protected]>
5Date: Tue, 24 Mar 2026 19:46:30 +0000
6Subject: [PATCH] phobos: Fixes for GNU/Hurd.
7
8---
9 Makefile | 2 +-
10 std/datetime/timezone.d | 1 +
11 std/math/algebraic.d | 1 +
12 std/process.d | 2 ++
13 4 files changed, 5 insertions(+), 1 deletion(-)
14
15diff --git a/Makefile b/Makefile
16index 4fa51299e..a9d4789f6 100644
17--- a/Makefile
18+++ b/Makefile
19@@ -305,7 +305,7 @@ else
20 endif
21
22 # build with shared library support (defaults to true on supported platforms)
23-SHARED=$(if $(findstring $(OS),linux freebsd),1,)
24+SHARED=$(if $(findstring $(OS),linux freebsd hurd),1,)
25
26 TESTS_EXTRACTOR=$(ROOT)/tests_extractor$(DOTEXE)
27 PUBLICTESTS_DIR=$(ROOT)/publictests
28diff --git a/std/datetime/timezone.d b/std/datetime/timezone.d
29index 7461fcaa3..05c2999d3 100644
30--- a/std/datetime/timezone.d
31+++ b/std/datetime/timezone.d
32@@ -338,6 +338,7 @@ public:
33 else version (linux) enum utcZone = "UTC";
34 else version (Darwin) enum utcZone = "UTC";
35 else version (Solaris) enum utcZone = "UTC";
36+ else version (Hurd) enum utcZone = "UTC";
37 else static assert(0, "The location of the UTC timezone file on this Posix platform must be set.");
38
39 auto tzs = [testTZ("America/Los_Angeles", "PST", "PDT", dur!"hours"(-8), dur!"hours"(1)),
40diff --git a/std/math/algebraic.d b/std/math/algebraic.d
41index f96f24f15..05bf08b9c 100644
42--- a/std/math/algebraic.d
43+++ b/std/math/algebraic.d
44@@ -631,6 +631,7 @@ else version (FreeBSD) version = GenericPosixVersion;
45 else version (OpenBSD) version = GenericPosixVersion;
46 else version (Solaris) version = GenericPosixVersion;
47 else version (DragonFlyBSD) version = GenericPosixVersion;
48+else version (Hurd) version = GenericPosixVersion;
49
50 private real polyImpl(real x, in real[] A) @trusted pure nothrow @nogc
51 {
52diff --git a/std/process.d b/std/process.d
53index d359ca0ba..dc981c5e5 100644
54--- a/std/process.d
55+++ b/std/process.d
56@@ -1031,6 +1031,8 @@ private Pid spawnProcessPosix(scope const(char[])[] args,
57 import core.sys.freebsd.unistd : closefrom;
58 else version (OpenBSD)
59 import core.sys.openbsd.unistd : closefrom;
60+ else version (Hurd)
61+ import core.sys.hurd.unistd : closefrom;
62
63 static if (!__traits(compiles, closefrom))
64 {
65--
662.52.0