From fb635e210354b1be0b04e2e1f941670036dae680 Mon Sep 17 00:00:00 2001 From: Damien Fouilleul Date: Sat, 11 Nov 2006 19:14:53 +0000 Subject: [PATCH] - access/file.c: fixed stat on win32, make sure the right stat structure is used, 'struct _stati64' on win32 and not 'struct stat' --- modules/access/file.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/access/file.c b/modules/access/file.c index 58aecfb8e9..3a621f8d31 100644 --- a/modules/access/file.c +++ b/modules/access/file.c @@ -53,6 +53,7 @@ #if defined( WIN32 ) && !defined( UNDER_CE ) /* fstat() support for large files on win32 */ # define fstat(a,b) _fstati64(a,b) +# define FILESTAT _stati64 # ifdef lseek # undef lseek # endif @@ -67,6 +68,8 @@ # undef lseek # endif # define lseek fseek +#else +# define FILESTAT stat #endif #include "charset.h" @@ -166,7 +169,7 @@ static int Open( vlc_object_t *p_this ) fd = open_file (p_access, p_access->psz_path); #ifdef HAVE_SYS_STAT_H - struct stat st; + struct FILESTAT st; while (fd != -1) { @@ -299,7 +302,7 @@ static int Read( access_t *p_access, uint8_t *p_buffer, int i_len ) if( p_access->info.i_size != 0 && (p_sys->i_nb_reads % INPUT_FSTAT_NB_READS) == 0 ) { - struct stat st; + struct FILESTAT st; if ((fstat (fd, &st) == 0) && (p_access->info.i_size != st.st_size)) -- 2.39.2