engine: whereami: add support for GNU/Hurd

This commit is contained in:
Alibek Omarov
2025-08-13 17:02:22 +05:00
parent 59d771c4e4
commit f12ef07c02

View File

@@ -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 <stdio.h>
#include <stdlib.h>
@@ -191,6 +191,10 @@ int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
#include <inttypes.h>
#include <stdbool.h>
#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"