]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
make bad <lua.h> a hard informative error
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 27 Feb 2020 10:24:00 +0000 (11:24 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 6 Mar 2020 08:56:14 +0000 (09:56 +0100)
daemon/bindings/impl.h

index 26b4dc80cb93b80cb273eaa0f5d60cc30ce65b62..0297805d7e8971b0beb18c7d1bff8c4f244fadac 100644 (file)
@@ -8,6 +8,13 @@
 
 #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
+       #error "Incorrect Lua version in #include <lua.h> - LuaJIT compatible with Lua 5.1 is required"
+#endif
+
 
 /** Useful to stringify #defines into error strings. */
 #define STR(s) STRINGIFY_TOKEN(s)