diff --git a/acinclude.m4 b/acinclude.m4 index 829050ef27..27d0c84219 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -940,6 +940,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) AC_CHECK_LINUX_STRUCT([ctl_table], [ctl_name], [sysctl.h]) AC_CHECK_LINUX_STRUCT([dentry], [d_u.d_alias], [dcache.h]) AC_CHECK_LINUX_STRUCT([dentry_operations], [d_automount], [dcache.h]) + AC_CHECK_LINUX_STRUCT([group_info], [gid], [cred.h]) AC_CHECK_LINUX_STRUCT([inode], [i_alloc_sem], [fs.h]) AC_CHECK_LINUX_STRUCT([inode], [i_blkbits], [fs.h]) AC_CHECK_LINUX_STRUCT([inode], [i_blksize], [fs.h]) diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h index 82aed0083d..7b457ca603 100644 --- a/src/afs/LINUX/osi_machdep.h +++ b/src/afs/LINUX/osi_machdep.h @@ -141,6 +141,11 @@ static inline long copyinstr(char *from, char *to, int count, int *length) { #define NGROUPS NGROUPS_SMALL #endif +#ifdef STRUCT_GROUP_INFO_HAS_GID +/* compat macro for Linux 4.9 */ +#define GROUP_AT(gi,x) ((gi)->gid[x]) +#endif + typedef struct task_struct afs_proc_t; #ifdef HAVE_LINUX_KUID_T