vfs: include winioctl.h for the punch_hole FSCTL codes

FILE_ZERO_DATA_INFORMATION, FSCTL_SET_SPARSE and FSCTL_SET_ZERO_DATA
are declared in winioctl.h, not windows.h, so the Windows arm of
retro_vfs_file_punch_hole_impl did not compile: eleven errors on MSVC
2022 ARM64 Debug, and the same under MinGW.

This is the second defect from the filestream_punch_hole commit, after
the UWP parity one fixed in f0023de. Both were reachable in seconds
with tools already present -- x86_64-w64-mingw32-gcc, and the
libretro-common Makefile.test that builds three Windows
configurations -- and I compiled only for Linux before sending the
original patch.

Verified: vfs_implementation.c compiles clean under gcc,
x86_64-w64-mingw32-gcc, and mingw with -DLEGACY_WIN32;
vfs_backend_parity.py reports 23 symbols with both backends agreeing;
libretro-common/Makefile.test passes including the Windows A/W matrix.
This commit is contained in:
libretroadmin committed 2026-08-23 04:37:07 +02:00
1 parent f0023de2a3
commit f7b4104c71
1 file changed
+3
+3
View File
@@ -44,6 +44,9 @@
# include <fcntl.h>
# include <direct.h>
# include <windows.h>
/* FILE_ZERO_DATA_INFORMATION and the FSCTL_* codes used by
* retro_vfs_file_punch_hole_impl are declared here, not in windows.h. */
# include <winioctl.h>
# endif
# include <io.h>
#else