diff --git a/inotify.c b/inotify.c index 432e530..dbb1335 100644 --- a/inotify.c +++ b/inotify.c @@ -129,7 +129,7 @@ l_rmwatch(lua_State *L) /** * Cores inotify functions. */ -static const luaL_reg linotfylib[] = { +static const luaL_Reg linotfylib[] = { {"addwatch", l_addwatch }, {"rmwatch", l_rmwatch }, {NULL, NULL} diff --git a/lsyncd.c b/lsyncd.c index fbb5d33..5433fd7 100644 --- a/lsyncd.c +++ b/lsyncd.c @@ -1263,7 +1263,7 @@ l_nonobserve_fd(lua_State *L) return 0; } -static const luaL_reg lsyncdlib[] = { +static const luaL_Reg lsyncdlib[] = { {"configure", l_configure }, {"exec", l_exec }, {"log", l_log }, @@ -1676,7 +1676,7 @@ main1(int argc, char *argv[]) int argp = 1; // load Lua - L = lua_open(); + L = luaL_newstate(); luaL_openlibs(L); { // checks the lua version diff --git a/lsyncd.h b/lsyncd.h index b94317d..88ef323 100644 --- a/lsyncd.h +++ b/lsyncd.h @@ -16,6 +16,8 @@ #define _XOPEN_SOURCE 700 #define _DARWIN_C_SOURCE 1 +#define LUA_COMPAT_ALL + // includes needed for headerfile #include "config.h"