From: Marco Eichelberg Date: Fri, 30 Jan 2026 17:21:33 +0000 (+0100) Subject: [PATCH] Added support for GNU Hurd in OFgetExecutablePath(). X-Git-Tag: archive/raspbian/3.7.0+really3.7.0-7+rpi1^2~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0c443ec3b25c2fab505dcfa298f410ed79057316;p=dcmtk.git [PATCH] Added support for GNU Hurd in OFgetExecutablePath(). Thanks to Pino Toscano (GitHub user pinotree) for the pull request. This closes GitHub PR #137. Gbp-Pq: Name hurd.patch --- diff --git a/ofstd/libsrc/ofwhere.c b/ofstd/libsrc/ofwhere.c index 3b6bec18..3e8b3e59 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) {