mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-26 04:16:00 -04:00
MINOR: lua: add a compilation error message when compiled with an incompatible version
haproxy Lua support begins with Lua 5.2. In order to ease the diagnostic on compilation error, a preprocessor error is added when an incompatible version is used. The compatibility is determined by the presence of LUA_VERSION_NUM and its magic value (502 for Lua 5.2.x).
This commit is contained in:
parent
47eb2193d7
commit
dc0306e3e4
1 changed files with 4 additions and 0 deletions
|
|
@ -4,6 +4,10 @@
|
|||
#include <lua.h>
|
||||
#include <lualib.h>
|
||||
|
||||
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
|
||||
#error "Requires Lua 5.2 or later."
|
||||
#endif
|
||||
|
||||
#include <ebpttree.h>
|
||||
|
||||
#include <common/cfgparse.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue