[vlc-commits] Win32: struct stat is a macro so we need to include <sys/stat.h>
Rémi Denis-Courmont
git at videolan.org
Wed Feb 1 17:00:22 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb 1 18:00:04 2012 +0200| [3fe85b38413bf225d34ec107abaa26ad852ca568] | committer: Rémi Denis-Courmont
Win32: struct stat is a macro so we need to include <sys/stat.h>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3fe85b38413bf225d34ec107abaa26ad852ca568
---
include/vlc_fs.h | 2 ++
src/win32/filesystem.c | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/vlc_fs.h b/include/vlc_fs.h
index 3c5c7a9..01b0c3c 100644
--- a/include/vlc_fs.h
+++ b/include/vlc_fs.h
@@ -63,6 +63,8 @@ static inline void vlc_rewinddir( DIR *dir )
}
# undef rewinddir
# define rewinddir vlc_rewinddir
+
+# include <sys/stat.h>
#endif
struct stat;
diff --git a/src/win32/filesystem.c b/src/win32/filesystem.c
index ea86b50..540cf7b 100644
--- a/src/win32/filesystem.c
+++ b/src/win32/filesystem.c
@@ -243,6 +243,9 @@ int vlc_stat (const char *filename, struct stat *buf)
if (wpath == NULL)
return -1;
+ static_assert (sizeof (*buf) == sizeof (struct _stati64),
+ "Mismatched struct stat definition.");
+
int ret = _wstati64 (wpath, buf);
free (wpath);
return ret;
More information about the vlc-commits
mailing list