aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rockspecs/luafilesystem-cvs-2.rockspec2
-rw-r--r--src/lfs.c11
2 files changed, 10 insertions, 3 deletions
diff --git a/rockspecs/luafilesystem-cvs-2.rockspec b/rockspecs/luafilesystem-cvs-2.rockspec
index 45e7b38..1320390 100644
--- a/rockspecs/luafilesystem-cvs-2.rockspec
+++ b/rockspecs/luafilesystem-cvs-2.rockspec
@@ -22,7 +22,7 @@ build = {
22 type = "make", 22 type = "make",
23 build_variables = { 23 build_variables = {
24 LIB_OPTION = "$(LIBFLAG)", 24 LIB_OPTION = "$(LIBFLAG)",
25 CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR)", 25 CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) $(STAT64)",
26 }, 26 },
27 install_variables = { 27 install_variables = {
28 LUA_LIBDIR = "$(LIBDIR)" 28 LUA_LIBDIR = "$(LIBDIR)"
diff --git a/src/lfs.c b/src/lfs.c
index d7ec5a8..caecf5f 100644
--- a/src/lfs.c
+++ b/src/lfs.c
@@ -16,7 +16,7 @@
16** lfs.touch (filepath [, atime [, mtime]]) 16** lfs.touch (filepath [, atime [, mtime]])
17** lfs.unlock (fh) 17** lfs.unlock (fh)
18** 18**
19** $Id: lfs.c,v 1.50 2008/03/25 16:58:29 mascarenhas Exp $ 19** $Id: lfs.c,v 1.51 2008/03/25 18:20:29 mascarenhas Exp $
20*/ 20*/
21 21
22#define _LARGEFILE64_SOURCE 22#define _LARGEFILE64_SOURCE
@@ -82,8 +82,15 @@ typedef struct dir_data {
82#define _O_BINARY 0 82#define _O_BINARY 0
83#define lfs_setmode(L,file,m) ((void)((void)file,m), \ 83#define lfs_setmode(L,file,m) ((void)((void)file,m), \
84 luaL_error(L, LUA_QL("setmode") " not supported on this platform"), -1) 84 luaL_error(L, LUA_QL("setmode") " not supported on this platform"), -1)
85#ifdef HAVE_STAT64
85#define STAT_STRUCT struct stat64 86#define STAT_STRUCT struct stat64
86#define STAT_FUNC stat64 87#define STAT_FUNC stat64
88#define LSTAT_FUNC lstat64
89#else
90#define STAT_STRUCT struct stat
91#define STAT_FUNC stat
92#define LSTAT_FUNC lstat
93#endif
87#endif 94#endif
88 95
89/* 96/*
@@ -627,7 +634,7 @@ static int file_info (lua_State *L) {
627*/ 634*/
628#ifndef _WIN32 635#ifndef _WIN32
629static int link_info (lua_State *L) { 636static int link_info (lua_State *L) {
630 return _file_info_ (L, lstat64); 637 return _file_info_ (L, LSTAT_FUNC);
631} 638}
632#else 639#else
633static int link_info (lua_State *L) { 640static int link_info (lua_State *L) {