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
commit c77b671a66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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 ------------------------------------------------*/