From 19305ab66230474049e0236e26a1b40f21e55c68 Mon Sep 17 00:00:00 2001 From: trim21 Date: Thu, 11 Jun 2026 12:10:40 +0800 Subject: [PATCH] fix: define LUA_OK for Lua 5.1 and LuaJIT compatibility LUA_OK was introduced in Lua 5.2. Define it as 0 for compatibility with Lua 5.1 and LuaJIT (which is based on Lua 5.1). --- src/rpc/lua.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rpc/lua.cc b/src/rpc/lua.cc index dce5f754..c1f5c703 100644 --- a/src/rpc/lua.cc +++ b/src/rpc/lua.cc @@ -10,6 +10,10 @@ #ifdef HAVE_LUA #include +// LUA_OK was introduced in Lua 5.2; define for Lua 5.1 and LuaJIT2.0. +#ifndef LUA_OK +#define LUA_OK 0 +#endif #endif #include