aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lpm.c')
-rw-r--r--src/lpm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lpm.c b/src/lpm.c
index 5c39f41..b19b11d 100644
--- a/src/lpm.c
+++ b/src/lpm.c
@@ -831,8 +831,11 @@ static const luaL_Reg system_lib[] = {
#endif
-extern const char src_lpm_luac[];
-extern unsigned int src_lpm_luac_len;
+#ifndef LPM_LIVE
+ extern const char src_lpm_luac[];
+ extern unsigned int src_lpm_luac_len;
+#endif
+
int main(int argc, char* argv[]) {
git_libgit2_init();
lua_State* L = luaL_newstate();
@@ -858,7 +861,7 @@ int main(int argc, char* argv[]) {
lua_setglobal(L, "PLATFORM");
lua_pushliteral(L, LITE_ARCH_TUPLE);
lua_setglobal(L, "ARCH");
- #if LPM_LIVE
+ #ifdef LPM_LIVE
if (luaL_loadfile(L, "src/lpm.lua") || lua_pcall(L, 0, 1, 0)) {
#else
if (luaL_loadbuffer(L, src_lpm_luac, src_lpm_luac_len, "lpm.lua") || lua_pcall(L, 0, 1, 0)) {