xref: /freebsd/sys/contrib/openzfs/config/kernel-kuid-helpers.m4 (revision 3c4ba5f55438f7afd4f4b0b56f88f2bb505fd6a6)
1dnl #
2dnl # 3.5 API change,
3dnl # Since usernamespaces were introduced in kernel version 3.5, it
4dnl # became necessary to go through one more level of indirection
5dnl # when dealing with uid/gid - namely the kuid type.
6dnl #
7dnl #
8AC_DEFUN([ZFS_AC_KERNEL_SRC_KUID_HELPERS], [
9	ZFS_LINUX_TEST_SRC([i_uid_read], [
10		#include <linux/fs.h>
11	],[
12		struct inode *ip = NULL;
13		(void) i_uid_read(ip);
14	])
15])
16
17AC_DEFUN([ZFS_AC_KERNEL_KUID_HELPERS], [
18	AC_MSG_CHECKING([whether i_(uid|gid)_(read|write) exist])
19	ZFS_LINUX_TEST_RESULT([i_uid_read], [
20		AC_MSG_RESULT(yes)
21	],[
22		ZFS_LINUX_TEST_ERROR([i_uid_read])
23	])
24])
25