diff --git a/src/cmake/Modules/CheckLuaNewstate.cc b/src/cmake/Modules/CheckLuaNewstate.cc index c9884bd72..784c2714f 100644 --- a/src/cmake/Modules/CheckLuaNewstate.cc +++ b/src/cmake/Modules/CheckLuaNewstate.cc @@ -6,6 +6,7 @@ Author: Leonardo de Moura */ #include #include +#include #include static void * lua_realloc(void *, void * q, size_t, size_t sz) { return realloc(q, sz); } @@ -13,7 +14,7 @@ static void * lua_realloc(void *, void * q, size_t, size_t sz) { return realloc( // Little program for checking whether lua_newstate is available int main() { lua_State * L; - L = lua_newstate(lua_realloc, nullptr); + L = lua_newstate(lua_realloc, 0); lua_close(L); return 0; }