d/patches/hurd.patch: new, fix the build on GNU/Hurd.
authorPino Toscano <pino@debian.org>
Sun, 8 Feb 2026 07:20:27 +0000 (08:20 +0100)
committerPino Toscano <pino@debian.org>
Sun, 8 Feb 2026 07:20:27 +0000 (08:20 +0100)
debian/patches/hurd.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/hurd.patch b/debian/patches/hurd.patch
new file mode 100644 (file)
index 0000000..62a1948
--- /dev/null
@@ -0,0 +1,39 @@
+From 418ee5087a23210a0bdd816746c98fc3ffc4709f Mon Sep 17 00:00:00 2001
+From: Marco Eichelberg <eichelberg@offis.de>
+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 <stdio.h>
+ #include <stdlib.h>
+@@ -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
+
index 9d0b2e0272eb85c4d56bd179bff48ea02148e5dc..baf00a43a5f8113360d1ade1a54c3deb95f5eabd 100644 (file)
@@ -10,3 +10,4 @@ remove_version.patch
 0012-CVE-2025-2357.patch
 0013-CVE-2025-9732.patch
 0014-CVE-2025-9732.patch
+hurd.patch