Support successfully bootstrapping on OpenBSD.

This commit is contained in:
Lauri Nurmi 2018-04-25 23:35:58 +03:00 committed by Lauri Nurmi
parent 8d0dce9c65
commit e71a99d0a1
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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);