Merge pull request #11221 from pinotree/hurd-fixes

Some fixes for GNU/Hurd
This commit is contained in:
Eelco Dolstra
2024-07-30 13:59:19 +02:00
committed by GitHub
3 changed files with 9 additions and 1 deletions

View File

@@ -29,4 +29,8 @@ ifdef HOST_OS
HOST_SOLARIS = 1
HOST_UNIX = 1
endif
ifeq ($(HOST_KERNEL), gnu)
HOST_HURD = 1
HOST_UNIX = 1
endif
endif

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];

View File

@@ -17,6 +17,10 @@
# define FS_ROOT FS_SEP
#endif
#ifndef PATH_MAX
# define PATH_MAX 4096
#endif
namespace nix {
/* ----------- tests for util.hh ------------------------------------------------*/