From f71d7752385dea3139eab45074afd4eac9258245 Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Mon, 25 Jan 2016 12:22:33 -0500 Subject: [PATCH] Allow xp compilation with the use GetFileInformationByHandleEx. --- src/file.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/file.cpp b/src/file.cpp index 6cc99de01..9f42c1bfe 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -2050,6 +2050,7 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER { } } +#if _WIN32_WINNT >= 0x0600 // only if Windows Vista or newer if ((m_open_mode & sparse) == 0) { typedef DWORD (WINAPI *GetFileInformationByHandleEx_t)(HANDLE hFile @@ -2097,6 +2098,7 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER { set_file_valid_data(m_file_handle, s); } } +#endif // if Windows Vista #else // NON-WINDOWS struct stat st; if (fstat(native_handle(), &st) != 0)