summaryrefslogtreecommitdiffstats
path: root/config/kernel-group-info.m4
blob: 849a1e246a4a35a58b6d43e020f30b9ebc26f392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
dnl #
dnl # 4.9 API change
dnl # group_info changed from 2d array via >blocks to 1d array via ->gid
dnl #
AC_DEFUN([ZFS_AC_KERNEL_GROUP_INFO_GID], [
	AC_MSG_CHECKING([whether group_info->gid exists])
	tmp_flags="$EXTRA_KCFLAGS"
	EXTRA_KCFLAGS="-Werror"
	ZFS_LINUX_TRY_COMPILE([
		#include <linux/cred.h>
	],[
		struct group_info *gi = groups_alloc(1);
		gi->gid[0] = KGIDT_INIT(0);
	],[
		AC_MSG_RESULT(yes)
		AC_DEFINE(HAVE_GROUP_INFO_GID, 1, [group_info->gid exists])
	],[
		AC_MSG_RESULT(no)
	])
	EXTRA_KCFLAGS="$tmp_flags"
])