From: Matt Benjamin Date: Thu, 10 Jan 2008 17:00:16 +0000 (+0000) Subject: DEVEL15-linux-2624-rc5-updates-20080110 X-Git-Tag: openafs-devel-1_5_30a~2 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=643431144260baa7e25d00fedf397e76978d5ad5;p=packages%2Fo%2Fopenafs.git DEVEL15-linux-2624-rc5-updates-20080110 LICENSE IPL10 FIXES 80463 Include linux/key-type.h in osi_groups.c, if it exists. Fix do_sync_read test for recent kbuild (maybe break it for [some older 2.6]). (cherry picked from commit 8569f67aee8ee0de26259397818ab3af69f18007) --- diff --git a/acinclude.m4 b/acinclude.m4 index 744db2ca5..728d433f7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -674,6 +674,10 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) AC_DEFINE(FREEZER_H_EXISTS, 1, [define if you have linux/freezer.h]) fi LINUX_REFRIGERATOR + LINUX_KEY_TYPE_H_EXISTS + if test "x$ac_cv_linux_key_type_h_exists" = "xyes" ; then + AC_DEFINE(KEY_TYPE_H_EXISTS, 1, [define if you have linux/key-type.h]) + fi LINUX_LINUX_KEYRING_SUPPORT LINUX_KEY_ALLOC_NEEDS_STRUCT_TASK LINUX_DO_SYNC_READ diff --git a/src/afs/LINUX/osi_groups.c b/src/afs/LINUX/osi_groups.c index ed7516c67..184a3e35c 100644 --- a/src/afs/LINUX/osi_groups.c +++ b/src/afs/LINUX/osi_groups.c @@ -17,6 +17,9 @@ #include "afs/param.h" #ifdef LINUX_KEYRING_SUPPORT #include +#if KEY_TYPE_H_EXISTS +#include +#endif #endif RCSID diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index e0e1bb814..22c2631e1 100644 --- a/src/cf/linux-test4.m4 +++ b/src/cf/linux-test4.m4 @@ -728,11 +728,28 @@ extern int vfs_statfs(struct dentry *, struct kstatfs *); ac_cv_linux_statfs_takes_dentry=no)]) AC_MSG_RESULT($ac_cv_linux_statfs_takes_dentry)]) + +AC_DEFUN([LINUX_KEY_TYPE_H_EXISTS], [ + AC_MSG_CHECKING([for linux/key-type.h existance]) + AC_CACHE_VAL([ac_cv_linux_key_type_h_exists], [ + AC_TRY_KBUILD( +[#include ], +[return;], + ac_cv_linux_key_type_h_exists=yes, + ac_cv_linux_key_type_h_exists=no)]) + AC_MSG_RESULT($ac_cv_linux_key_type_h_exists) + if test "x$ac_cv_linux_key_type_h_exists" = "xyes"; then + AC_DEFINE([KEY_TYPE_H_EXISTS], 1, [define if linux/key-type.h exists]) + fi]) + AC_DEFUN([LINUX_LINUX_KEYRING_SUPPORT], [ AC_MSG_CHECKING([for linux kernel keyring support]) AC_CACHE_VAL([ac_cv_linux_keyring_support], [ AC_TRY_KBUILD( [#include +#ifdef KEY_TYPE_H_EXISTS +#include +#endif #include #include ], [#ifdef CONFIG_KEYS