1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
From: Pino Toscano <toscano.pino@tiscali.it>
Date: Wed, 18 Jun 2025 07:50:15 +0200
Subject: Implement get_program_name() on GNU/Hurd
There is a Linux-compatible procfs that provides /proc/self/exe, so use
that.
Origin: upstream, https://gitlab.com/inkscape/inkscape/-/commit/5ebf2c57757d68b7c5b6283b3987e1f74ffc917b
---
src/path-prefix.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/path-prefix.cpp b/src/path-prefix.cpp
index e3be584..cc885f4 100644
--- a/src/path-prefix.cpp
+++ b/src/path-prefix.cpp
@@ -213,7 +213,7 @@ char const *get_program_name()
} else {
g_warning("get_program_name() - _NSGetExecutablePath failed");
}
-#elif defined(__linux__) || defined(__CYGWIN__)
+#elif defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__)
program_name = g_file_read_link("/proc/self/exe", NULL);
if (!program_name) {
g_warning("get_program_name() - g_file_read_link failed");
|