xref: /freebsd/sys/contrib/openzfs/config/kernel-truncate-setsize.m4 (revision fe6060f10f634930ff71b7c50291ddc610da2475)
1dnl #
2dnl # 2.6.35 API change
3dnl # Added truncate_setsize() helper function.
4dnl #
5AC_DEFUN([ZFS_AC_KERNEL_SRC_TRUNCATE_SETSIZE], [
6	ZFS_LINUX_TEST_SRC([truncate_setsize], [
7		#include <linux/mm.h>
8	], [
9		truncate_setsize(NULL, 0);
10	])
11])
12
13AC_DEFUN([ZFS_AC_KERNEL_TRUNCATE_SETSIZE], [
14	AC_MSG_CHECKING([whether truncate_setsize() is available])
15	ZFS_LINUX_TEST_RESULT_SYMBOL([truncate_setsize],
16	    [truncate_setsize], [mm/truncate.c], [
17		AC_MSG_RESULT(yes)
18	], [
19		ZFS_LINUX_TEST_ERROR([truncate_setsize])
20	])
21])
22