From 201a65635055cb5a2987dc23819ba0fcb18e4e14 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 17 Oct 2014 21:46:08 +0200 Subject: win32: get rid of mp_stat in the normal source code mp_stat() instead of stat() was used in the normal code (i.e. even on Unix), because MinGW-w64 has an unbelievable macro-mess in place, which prevents solving this elegantly. Add some dirty workarounds to hide mp_stat() from the normal code properly. This now requires replacing all functions that use the struct stat type. This includes fstat, lstat, fstatat, and possibly others. (mpv currently uses stat and fstat only.) --- video/out/vo_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video') diff --git a/video/out/vo_image.c b/video/out/vo_image.c index 991265da23..a130048e54 100644 --- a/video/out/vo_image.c +++ b/video/out/vo_image.c @@ -55,7 +55,7 @@ static bool checked_mkdir(struct vo *vo, const char *buf) char *errstr = strerror(errno); if (errno == EEXIST) { struct stat stat_p; - if (mp_stat(buf, &stat_p ) == 0 && S_ISDIR(stat_p.st_mode)) + if (stat(buf, &stat_p ) == 0 && S_ISDIR(stat_p.st_mode)) return true; } MP_ERR(vo, "Error creating output directory: %s\n", errstr); -- cgit v1.2.3