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 e95dcab..8b8f68e 100644
--- a/src/lfs.c
+++ b/src/lfs.c
@@ -819,6 +819,15 @@ static const struct luaL_Reg fslib[] = {
819 {NULL, NULL}, 819 {NULL, NULL},
820}; 820};
821 821
822#if LUA_VERSION_NUM > 501
823static void luaL_register (lua_State *L, const char *libname, const luaL_Reg *l)
824{
825 luaL_newlib (L, l);
826 lua_pushvalue (L, -1);
827 lua_setglobal (L, libname);
828}
829#endif
830
822int luaopen_lfs (lua_State *L) { 831int luaopen_lfs (lua_State *L) {
823 dir_create_meta (L); 832 dir_create_meta (L);
824 lock_create_meta (L); 833 lock_create_meta (L);