[vlc-commits] vlc_fs: Fix win32 compilation
Jean-Baptiste Kempf
git at videolan.org
Mon Aug 24 23:23:42 CEST 2015
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Aug 24 23:23:13 2015 +0200| [7ff25f981051a06d2c19505c428e9dbe925ae43b] | committer: Jean-Baptiste Kempf
vlc_fs: Fix win32 compilation
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7ff25f981051a06d2c19505c428e9dbe925ae43b
---
include/vlc_fs.h | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/include/vlc_fs.h b/include/vlc_fs.h
index 8acb6b1..69bd743 100644
--- a/include/vlc_fs.h
+++ b/include/vlc_fs.h
@@ -27,6 +27,25 @@
struct stat;
struct iovec;
+#ifdef _WIN32
+# include <sys/stat.h>
+# 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
+
+
/**
* \defgroup os Operating system
* @{
@@ -244,18 +263,6 @@ static inline void vlc_rewinddir( DIR *dir )
}
# undef rewinddir
# define rewinddir vlc_rewinddir
-
-# include <sys/stat.h>
-# ifndef stat
-# define stat _stati64
-# endif
-# ifndef fstat
-# define fstat _fstati64
-# endif
-# ifndef _MSC_VER
-# undef lseek
-# define lseek _lseeki64
-# endif
#endif
#ifdef __ANDROID__
More information about the vlc-commits
mailing list