Commit fb635e21 authored by Damien Fouilleul's avatar Damien Fouilleul

- access/file.c: fixed stat on win32, make sure the right stat structure is...

- access/file.c: fixed stat on win32, make sure the right stat structure is used, 'struct _stati64' on win32 and not 'struct stat'
parent 04cf4f55
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment