diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_magnet.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mod_magnet.c b/src/mod_magnet.c index 030ac90b..cdf52fff 100644 --- a/src/mod_magnet.c +++ b/src/mod_magnet.c @@ -201,6 +201,12 @@ SETDEFAULTS_FUNC(mod_magnet_set_defaults) { #endif #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502 +#ifdef __has_include +#if __has_include(<luajit.h>) +#include <luajit.h> +#endif +#endif +#if !defined(LUAJIT_VERSION_NUM) || LUAJIT_VERSION_NUM < 20005 static lua_Integer lua_tointegerx (lua_State * const L, int idx, int *isnum) { @@ -210,6 +216,7 @@ lua_tointegerx (lua_State * const L, int idx, int *isnum) return *isnum ? lua_tointeger(L, idx) : 0; } #endif +#endif #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502 /* lua5.1 backward compat definition */ |