mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 06:42:28 +00:00
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:
parent
d7f46cf28e
commit
7442f4a161
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user