aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lfs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lfs.c b/src/lfs.c
index a784d77..701c950 100644
--- a/src/lfs.c
+++ b/src/lfs.c
@@ -873,6 +873,15 @@ static const struct luaL_Reg fslib[] = {
873 {NULL, NULL}, 873 {NULL, NULL},
874}; 874};
875 875
876#if LUA_VERSION_NUM > 501
877static void luaL_register (lua_State *L, const char *libname, const luaL_Reg *l)
878{
879 luaL_newlib (L, l);
880 lua_pushvalue (L, -1);
881 lua_setglobal (L, libname);
882}
883#endif
884
876int luaopen_lfs (lua_State *L) { 885int luaopen_lfs (lua_State *L) {
877 dir_create_meta (L); 886 dir_create_meta (L);
878 lock_create_meta (L); 887 lock_create_meta (L);