From ecfe5e1af398ece2ec72c7c1abf33146d2a118ec Mon Sep 17 00:00:00 2001 From: CodingKoopa Date: Fri, 8 Mar 2024 06:09:12 +0000 Subject: [PATCH] win32_io.c: use stat on Cygwin Fixes compiler error (among others): win32_io.c: In function 'ntfs_device_win32_stat': win32_io.c:1804:31: error: invalid application of 'sizeof' to incomplete type 'struct stat64' 1804 | memset(buf, 0, sizeof(struct stat)); | ^~~~~~ --- libntfs-3g/win32_io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libntfs-3g/win32_io.c b/libntfs-3g/win32_io.c index 20976686..b1422603 100644 --- a/libntfs-3g/win32_io.c +++ b/libntfs-3g/win32_io.c @@ -61,7 +61,9 @@ typedef unsigned long long DWORD64; #endif #ifdef HAVE_SYS_STAT_H #include +#ifndef __CYGWIN__ /* See https://cygwin.com/faq.html#faq.programming.stat64 */ #define stat stat64 +#endif #define st_blocks st_rdev /* emulate st_blocks, missing in Windows */ #endif