]> git.proxmox.com Git - mirror_zfs-debian.git/blame - config/kernel-truncate-range.m4
Add dpkg-dev to Depends of zfs-dkms (Closes: #900714)
[mirror_zfs-debian.git] / config / kernel-truncate-range.m4
CommitLineData
ea1fdf46
RY
1dnl #
2dnl # 3.5.0 API change
3dnl # torvalds/linux@17cf28afea2a1112f240a3a2da8af883be024811 removed
4dnl # truncate_range(). The file hole punching functionality is now
5dnl # provided by fallocate()
6dnl #
7AC_DEFUN([ZFS_AC_KERNEL_TRUNCATE_RANGE], [
8 AC_MSG_CHECKING([whether iops->truncate_range() exists])
9 ZFS_LINUX_TRY_COMPILE([
10 #include <linux/fs.h>
11 void truncate_range(struct inode *inode, loff_t start,
12 loff_t end) { return; }
13 static struct inode_operations iops __attribute__ ((unused)) = {
14 .truncate_range = truncate_range,
15 };
16 ],[
17 ],[
18 AC_MSG_RESULT(yes)
19 AC_DEFINE(HAVE_INODE_TRUNCATE_RANGE, 1,
20 [iops->truncate_range() exists])
21 ],[
22 AC_MSG_RESULT(no)
23 ])
24])