aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/pposix.c
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-09-18 02:22:48 +0200
committerKim Alvefur <zash@zash.se>2014-09-18 02:22:48 +0200
commit1324a994958a3d4206640db57b11a7a6d504d83a (patch)
tree361f642064745fd1a6601050e7573062ff65e2ad /util-src/pposix.c
parent04368a22ef17c788d0a734b594f206a3c25f82fc (diff)
parente9fa1d1db3a14e8b0d989c3c3e983521034ad38c (diff)
downloadprosody-1324a994958a3d4206640db57b11a7a6d504d83a.tar.gz
prosody-1324a994958a3d4206640db57b11a7a6d504d83a.zip
Merge 0.10->trunk
Diffstat (limited to 'util-src/pposix.c')
-rw-r--r--util-src/pposix.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/util-src/pposix.c b/util-src/pposix.c
index 9b3e97eb..49e80f71 100644
--- a/util-src/pposix.c
+++ b/util-src/pposix.c
@@ -35,6 +35,10 @@
#include "lualib.h"
#include "lauxlib.h"
+#if (LUA_VERSION_NUM == 502)
+#define luaL_register(L, N, R) luaL_setfuncs(L, R, 0)
+#endif
+
#include <fcntl.h>
#if defined(__linux__) && defined(_GNU_SOURCE)
#include <linux/falloc.h>
@@ -768,7 +772,8 @@ int luaopen_util_pposix(lua_State *L)
{ NULL, NULL }
};
- luaL_register(L, "pposix", exports);
+ lua_newtable(L);
+ luaL_register(L, NULL, exports);
lua_pushliteral(L, "pposix");
lua_setfield(L, -2, "_NAME");