xref: /freebsd/sys/contrib/openzfs/config/kernel-kuid-helpers.m4 (revision a521f2116473fbd8c09db395518f060a27d02334)
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