aMule Forum
English => Compilation problems => Topic started by: Radek on May 23, 2008, 02:08:29 PM
-
Hi!
Starting with yesterday, there is a problem in PlatformSpecific::CreateSparseFile() (src/PlatformSpecific.cpp, Line 91):
FSCTL_SET_ZERO_DATA is not to be found in WinIoCtl.h. I located it in ddk/ntifs.h instead. After making the change as shown below, the compilation went through without further problems.
// 20080523/Radek - changed include file for definition of FSCTL_SET_ZERO_DATA
//#include <WinIoCtl.h>
#include <ddk/ntifs.h>
Cheers
-
There was a change to support Sparce with MSVC - breaking MINGW obviously...
-
The definitions for FSCTL_SET_SPARSE are different on winioctl.h and ddk/ntifs.h. Now which should be used?
./ddk/ntifs.h:#define FSCTL_SET_SPARSE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 49, METHOD_BUFFERED, FILE_WRITE_DATA)
./winioctl.h:#define FSCTL_SET_SPARSE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 49, METHOD_BUFFERED, FILE_SPECIAL_ACCESS)
-
Whatever. Your patch fixes compilation, and sparse files work both with MINGW and MSVC as I just verified. Good work! :D