From e71a99d0a1cde81cfea31ab8b45fe9ace1b6458f Mon Sep 17 00:00:00 2001 From: Lauri Nurmi Date: Wed, 25 Apr 2018 23:35:58 +0300 Subject: [PATCH] Support successfully bootstrapping on OpenBSD. --- Bootstrap.mak | 2 +- src/host/premake.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Bootstrap.mak b/Bootstrap.mak index 39e21ba4..903c3506 100644 --- a/Bootstrap.mak +++ b/Bootstrap.mak @@ -89,7 +89,7 @@ bsd: $(SRC) $(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $? -lm ./build/bootstrap/premake_bootstrap embed ./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake - $(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG) + $(MAKE) -C build/bootstrap -j`getconf NPROCESSORS_ONLN` config=$(CONFIG) windows-base: $(SRC) $(SILENT) if exist .\bin rmdir /s /q .\bin diff --git a/src/host/premake.c b/src/host/premake.c index 1a497539..3a56bdb0 100644 --- a/src/host/premake.c +++ b/src/host/premake.c @@ -365,7 +365,7 @@ int premake_locate_executable(lua_State* L, const char* argv0) } #endif -#if PLATFORM_BSD +#if PLATFORM_BSD && !defined(__OpenBSD__) int len = readlink("/proc/curproc/file", buffer, PATH_MAX - 1); if (len < 0) len = readlink("/proc/curproc/exe", buffer, PATH_MAX - 1);