]> git.sesse.net Git - vlc/blobdiff - include/vlc_fs.h
livehttp: fix memory leak (cid #1048908)
[vlc] / include / vlc_fs.h
index d5b78e27411bc2ff70f9c3fc87af7fbdba6578a1..86be4c27be9fb5d9e393fbdb58e0e1c437f4e529 100644 (file)
@@ -45,7 +45,7 @@ VLC_API int vlc_unlink( const char *filename );
 VLC_API int vlc_rename( const char *oldpath, const char *newpath );
 VLC_API char *vlc_getcwd( void ) VLC_USED;
 
-#if defined( WIN32 )
+#if defined( _WIN32 )
 static inline int vlc_closedir( DIR *dir )
 {
     _WDIR *wdir = *(_WDIR **)dir;
@@ -65,11 +65,20 @@ static inline void vlc_rewinddir( DIR *dir )
 # define rewinddir vlc_rewinddir
 
 # include <sys/stat.h>
-# ifndef UNDER_CE
-#  ifndef stat
-#   define stat _stati64
-#  endif
+# ifndef stat
+#  define stat _stati64
 # endif
+# ifndef fstat
+#  define fstat _fstati64
+# endif
+# ifndef _MSC_VER
+#  undef lseek
+#  define lseek _lseeki64
+# endif
+#endif
+
+#ifdef __ANDROID__
+# define lseek lseek64
 #endif
 
 struct stat;