From: Christof Hanke Date: Thu, 26 May 2011 05:46:32 +0000 (+0200) Subject: linux: add read_descriptor_t configure test and ifdef X-Git-Tag: upstream/1.6.0.pre6^2~1 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=7640d15c914d40ba42b753afcfc419ef12e39557;p=packages%2Fo%2Fopenafs.git linux: add read_descriptor_t configure test and ifdef With linux 2.6.8 the struct read_descriptor_t changed. Add a configure-test and respective ifdef to deal with that. Reviewed-on: http://gerrit.openafs.org/4719 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 7133266bafbf238ef921690c40846f3ea2d2fc8b) Change-Id: Ifdc7c1d3c4162452c1576942b7bfe37ea5014a77 Reviewed-on: http://gerrit.openafs.org/4726 Reviewed-by: Christof Hanke Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/acinclude.m4 b/acinclude.m4 index f5538b70f..1dd4bfe61 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -813,6 +813,10 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) AC_CHECK_LINUX_STRUCT([task_struct], [thread_info], [sched.h]) LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM + dnl Check for typed structure elements + AC_CHECK_LINUX_TYPED_STRUCT([read_descriptor_t], + [buf], [fs.h]) + dnl Function existence checks AC_CHECK_LINUX_FUNC([bdi_init], diff --git a/src/afs/LINUX/osi_fetchstore.c b/src/afs/LINUX/osi_fetchstore.c index 4989a01ed..4089bbbee 100644 --- a/src/afs/LINUX/osi_fetchstore.c +++ b/src/afs/LINUX/osi_fetchstore.c @@ -126,7 +126,11 @@ static int afs_linux_read_actor(read_descriptor_t *desc, struct page *page, unsigned long offset, unsigned long size) { +#ifdef READ_DESCRIPTOR_T_HAS_BUF + struct rxfs_storeVariables *svar = (void *) desc->buf; +#else struct rxfs_storeVariables *svar = desc->arg.data; +#endif unsigned long count = desc->count; int code;