diff --git a/engine/common/whereami.c b/engine/common/whereami.c index 31726774..3eb3f086 100644 --- a/engine/common/whereami.c +++ b/engine/common/whereami.c @@ -175,7 +175,7 @@ int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length) return length; } -#elif defined(__linux__) || defined(__CYGWIN__) || defined(__sun) || defined(__serenity__) || defined(WAI_USE_PROC_SELF_EXE) +#elif defined(__linux__) || defined(__CYGWIN__) || defined(__sun) || defined(__serenity__) || defined(__gnu_hurd__) || defined(WAI_USE_PROC_SELF_EXE) #include #include @@ -191,6 +191,10 @@ int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length) #include #include +#if defined(__gnu_hurd__) && !defined(PATH_MAX) +#define PATH_MAX 4096 +#endif // defined(__gnu_hurd__) && !defined(PATH_MAX) + #if !defined(WAI_PROC_SELF_EXE) #if defined(__sun) #define WAI_PROC_SELF_EXE "/proc/self/path/a.out"