]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/bindings: stricter luajit detection
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 4 May 2020 10:17:43 +0000 (12:17 +0200)
committerPetr Špaček <petr.spacek@nic.cz>
Thu, 7 May 2020 06:47:40 +0000 (08:47 +0200)
daemon/bindings/impl.h

index 0297805d7e8971b0beb18c7d1bff8c4f244fadac..bb11e1b28ffb1c75642a94da87bc958dcaeb160e 100644 (file)
@@ -9,9 +9,8 @@
 #include <lua.h>
 #include <lauxlib.h>
 /* It may happen that include files are messed up and we're hitting a header
- * e.g. from Lua 5.2 or 5.3.  Header from 5.1 should work OK, and it's more difficult
- * to differentiate from a luajit one. */
-#if LUA_VERSION_NUM != 501
+ * e.g. from vanilla Lua.  Even 5.1 won't work due to missing luaL_traceback() in <lauxlib.h>. */
+#if (LUA_VERSION_NUM) != 501 || !defined(LUA_LJDIR)
        #error "Incorrect Lua version in #include <lua.h> - LuaJIT compatible with Lua 5.1 is required"
 #endif