From 7ee2d8e1b24a0ae3f671fc852e42301c017f0576 Mon Sep 17 00:00:00 2001 From: tomas Date: Tue, 15 May 2007 12:58:35 +0000 Subject: Compilation bug fix: ISO C90 forbids mixed declarations and code --- src/lfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lfs.c b/src/lfs.c index 13c014e..bc763c1 100644 --- a/src/lfs.c +++ b/src/lfs.c @@ -14,7 +14,7 @@ ** lfs.touch (filepath [, atime [, mtime]]) ** lfs.unlock (fh) ** -** $Id: lfs.c,v 1.36 2007/05/08 19:23:12 carregal Exp $ +** $Id: lfs.c,v 1.37 2007/05/15 12:58:35 tomas Exp $ */ #include @@ -254,6 +254,8 @@ static int remove_dir (lua_State *L) { static int dir_iter (lua_State *L) { #ifdef _WIN32 struct _finddata_t c_file; +#else + struct dirent *entry; #endif dir_data *d = (dir_data *)lua_touserdata (L, lua_upvalueindex (1)); luaL_argcheck (L, !d->closed, 1, "closed directory"); @@ -279,7 +281,6 @@ static int dir_iter (lua_State *L) { } } #else - struct dirent *entry; if ((entry = readdir (d->dir)) != NULL) { lua_pushstring (L, entry->d_name); return 1; -- cgit v1.2.3-55-g6feb