diff --git a/src/ntfs_dir.c b/src/ntfs_dir.c index c7b6d3ad..08a2c970 100644 --- a/src/ntfs_dir.c +++ b/src/ntfs_dir.c @@ -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)); diff --git a/src/ntfs_io.c b/src/ntfs_io.c index 96f30af6..ce4cefc4 100644 --- a/src/ntfs_io.c +++ b/src/ntfs_io.c @@ -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; }