libutil: use /proc/self/exe on Hurd as well

Rely on the Linux-compatible procfs available on the Hurd to get the
path of the current executable.
This commit is contained in:
Pino Toscano 2024-07-30 05:31:42 +02:00
parent d7f46cf28e
commit 7442f4a161

View file

@ -137,7 +137,7 @@ std::optional<Path> getSelfExe()
{
static auto cached = []() -> std::optional<Path>
{
#if __linux__
#if __linux__ || __GNU__
return readLink("/proc/self/exe");
#elif __APPLE__
char buf[1024];