From 14987af80ab583514f19ef36d1023655324fc757 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Wed, 31 Jan 2024 14:29:23 +0100 Subject: [PATCH] Prevent include of luajit_rolling.h. Thanks to Peter Cawley. #1145 --- src/host/genversion.lua | 2 +- src/luajit_rolling.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/host/genversion.lua b/src/host/genversion.lua index 28f7206c..f0925160 100644 --- a/src/host/genversion.lua +++ b/src/host/genversion.lua @@ -29,7 +29,7 @@ local function file_write_mod(file, data) assert(fp:close()) end -local text = file_read(FILE_ROLLING_H) +local text = file_read(FILE_ROLLING_H):gsub("#error.-\n", "") local relver = file_read(FILE_RELVER_TXT):match("(%d+)") if relver then diff --git a/src/luajit_rolling.h b/src/luajit_rolling.h index 27368836..e7ff2c23 100644 --- a/src/luajit_rolling.h +++ b/src/luajit_rolling.h @@ -67,4 +67,5 @@ LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode); /* Enforce (dynamic) linker error for version mismatches. Call from main. */ LUA_API void LUAJIT_VERSION_SYM(void); +#error "DO NOT USE luajit_rolling.h -- only include build-generated luajit.h" #endif