Skip to content

Commit

Permalink
Support successfully bootstrapping on OpenBSD.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanurmi authored and Lauri Nurmi committed Apr 26, 2018
1 parent 8d0dce9 commit e71a99d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Bootstrap.mak
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/host/premake.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e71a99d

Please sign in to comment.