From 0d3ad3a2824c658c84141bc821737dba84fabc3c Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sun, 8 Feb 2026 08:20:27 +0100 Subject: [PATCH] d/patches/hurd.patch: new, fix the build on GNU/Hurd. --- debian/patches/hurd.patch | 39 +++++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 40 insertions(+) create mode 100644 debian/patches/hurd.patch diff --git a/debian/patches/hurd.patch b/debian/patches/hurd.patch new file mode 100644 index 00000000..62a1948a --- /dev/null +++ b/debian/patches/hurd.patch @@ -0,0 +1,39 @@ +From 418ee5087a23210a0bdd816746c98fc3ffc4709f Mon Sep 17 00:00:00 2001 +From: Marco Eichelberg +Date: Fri, 30 Jan 2026 18:21:33 +0100 +Subject: [PATCH] Added support for GNU Hurd in OFgetExecutablePath(). + +Thanks to Pino Toscano (GitHub user pinotree) for the pull request. + +This closes GitHub PR #137. +--- + ofstd/libsrc/ofwhere.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/ofstd/libsrc/ofwhere.c b/ofstd/libsrc/ofwhere.c +index 3b6bec18e..3e8b3e591 100644 +--- a/ofstd/libsrc/ofwhere.c ++++ b/ofstd/libsrc/ofwhere.c +@@ -165,7 +165,7 @@ int OFgetExecutablePath(char* out, int capacity, int* dirname_length) + return OFgetModulePath_(NULL, out, capacity, dirname_length); + } + +-#elif defined(__linux__) || defined(__CYGWIN__) || defined(__sun) || defined(WAI_USE_PROC_SELF_EXE) ++#elif defined(__linux__) || defined(__CYGWIN__) || defined(__sun) || defined(__GNU__) || defined(WAI_USE_PROC_SELF_EXE) + + #include + #include +@@ -185,6 +185,10 @@ int OFgetExecutablePath(char* out, int capacity, int* dirname_length) + #endif + #endif + ++#if !defined(PATH_MAX) ++#define PATH_MAX 1024 ++#endif ++ + + int OFgetExecutablePath(char* out, int capacity, int* dirname_length) + { +-- +2.51.0 + diff --git a/debian/patches/series b/debian/patches/series index 9d0b2e02..baf00a43 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -10,3 +10,4 @@ remove_version.patch 0012-CVE-2025-2357.patch 0013-CVE-2025-9732.patch 0014-CVE-2025-9732.patch +hurd.patch -- 2.30.2