| 1 | Upstream-status: https://github.com/dlang/phobos/pull/10980
|
| 2 |
|
| 3 | From e2d65597896089a8bd06992a4b83e3d14176b02c Mon Sep 17 00:00:00 2001
|
| 4 | From: Yelninei <[email protected]>
|
| 5 | Date: Tue, 24 Mar 2026 19:46:30 +0000
|
| 6 | Subject: [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 |
|
| 15 | diff --git a/Makefile b/Makefile
|
| 16 | index 4fa51299e..a9d4789f6 100644
|
| 17 | |
| 18 | |
| 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
|
| 28 | diff --git a/std/datetime/timezone.d b/std/datetime/timezone.d
|
| 29 | index 7461fcaa3..05c2999d3 100644
|
| 30 | |
| 31 | |
| 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)),
|
| 40 | diff --git a/std/math/algebraic.d b/std/math/algebraic.d
|
| 41 | index f96f24f15..05bf08b9c 100644
|
| 42 | |
| 43 | |
| 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 | {
|
| 52 | diff --git a/std/process.d b/std/process.d
|
| 53 | index d359ca0ba..dc981c5e5 100644
|
| 54 | |
| 55 | |
| 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 | --
|
| 66 | 2.52.0
|