From 7133266bafbf238ef921690c40846f3ea2d2fc8b Mon Sep 17 00:00:00 2001 From: Christof Hanke Date: Thu, 26 May 2011 07:46:32 +0200 Subject: [PATCH] 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. Change-Id: Iff1a6252707cd2119bdc0382c641934119ea0422 Reviewed-on: http://gerrit.openafs.org/4719 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear --- acinclude.m4 | 4 ++++ src/afs/LINUX/osi_fetchstore.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index a8b3634833..4ba2d40b43 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 4989a01ed8..4089bbbeee 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;