summaryrefslogtreecommitdiffstats
path: root/waftools/detections
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossy@jrg.systems>2017-10-23 21:01:45 +1100
committerJames Ross-Gowan <rossy@jrg.systems>2017-10-25 22:37:20 +1100
commit257a2b9646e845ef801588e871b9859d30ebf99a (patch)
tree7f9c3aec6ee54f9100ca191acd83e3a5cd0f4854 /waftools/detections
parenta5b51f75dc049b0713f4bb77cae4cb9e39ae8d49 (diff)
downloadmpv-257a2b9646e845ef801588e871b9859d30ebf99a.tar.bz2
mpv-257a2b9646e845ef801588e871b9859d30ebf99a.tar.xz
win32: add more-POSIXy versions of open() and fstat()
Directory-opening never worked on Windows because MSVCRT's open() doesn't open directories and its fstat() doesn't recognise directory handles. These are just MSVCRT restrictions, and the Windows API itself has no problem with opening directories as file objects, so reimplement mpv's mp_open and mp_stat to use the Windows API directly. This should fix directory playback. This also populates the st_dev and st_ino fields of struct stat, so filesystem loop checking in demux_playlist.c should now work on Windows. Fixes #4711
Diffstat (limited to 'waftools/detections')
-rw-r--r--waftools/detections/compiler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py
index 7033cf561f..1befec5db5 100644
--- a/waftools/detections/compiler.py
+++ b/waftools/detections/compiler.py
@@ -52,7 +52,7 @@ def __add_clang_flags__(ctx):
"-Wno-tautological-constant-out-of-range-compare" ]
def __add_mswin_flags__(ctx):
- ctx.env.CFLAGS += ['-D_WIN32_WINNT=0x0601', '-DUNICODE', '-DCOBJMACROS',
+ ctx.env.CFLAGS += ['-D_WIN32_WINNT=0x0602', '-DUNICODE', '-DCOBJMACROS',
'-DINITGUID', '-U__STRICT_ANSI__']
ctx.env.LAST_LINKFLAGS += ['-Wl,--major-os-version=6,--minor-os-version=0',
'-Wl,--major-subsystem-version=6,--minor-subsystem-version=0']