Fix ntfsprogs support when using mingw compiler
This commit is contained in:
parent
41e13c7075
commit
ef199744f7
2 changed files with 6 additions and 0 deletions
|
@ -259,12 +259,14 @@ static int ntfs_td_list_entry( struct ntfs_dir_struct *ls, const ntfschar *name
|
|||
#ifdef DJGPP
|
||||
new_file->file_size=filesize;
|
||||
#endif
|
||||
#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
|
||||
new_file->stat.st_blksize=DEFAULT_SECTOR_SIZE;
|
||||
#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
|
||||
if(new_file->stat.st_blksize!=0)
|
||||
{
|
||||
new_file->stat.st_blocks=(filesize + new_file->stat.st_blksize - 1) / new_file->stat.st_blksize;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
new_file->stat.st_atime=td_ntfs2utc(sle64_to_cpu(si->last_access_time));
|
||||
new_file->stat.st_mtime=td_ntfs2utc(sle64_to_cpu(si->last_data_change_time));
|
||||
|
|
|
@ -147,7 +147,9 @@ static int ntfs_device_testdisk_io_sync(struct ntfs_device *dev)
|
|||
static int ntfs_device_testdisk_io_stat(struct ntfs_device *dev, struct stat *buf)
|
||||
{
|
||||
log_warning("ntfs_device_testdisk_io_stat() unimplemented\n");
|
||||
#ifdef ENOTSUP
|
||||
errno = ENOTSUP;
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -155,7 +157,9 @@ static int ntfs_device_testdisk_io_ioctl(struct ntfs_device *dev, int request,
|
|||
void *argp)
|
||||
{
|
||||
log_warning( "ntfs_device_testdisk_io_ioctl() unimplemented\n");
|
||||
#ifdef ENOTSUP
|
||||
errno = ENOTSUP;
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue