From: Marc Dionne Date: Sat, 31 Oct 2009 17:27:18 +0000 (-0400) Subject: Linux: Fix write_begin configure test for recent RHEL kernels X-Git-Tag: openafs-devel-1_5_67~91 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=715c67f2fb3c1756f0c9cee0bc3258a3e378d3fd;p=packages%2Fo%2Fopenafs.git Linux: Fix write_begin configure test for recent RHEL kernels Recent RHEL kernels now define simple_write_begin, which was used as a test for the write_begin address_space op. This makes the test succeed when it shouldn't, and breaks the build. Rewrite the test to actually check the address_space operation. Change-Id: Idac9b318ff716b61bf8ca4508d2dbdbfbad5b50d Reviewed-on: http://gerrit.openafs.org/759 Reviewed-by: Simon Wilkinson Tested-by: Marc Dionne Reviewed-by: Derrick Brashear --- diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index b9fd21fa5..bd30b75cb 100644 --- a/src/cf/linux-test4.m4 +++ b/src/cf/linux-test4.m4 @@ -1182,7 +1182,8 @@ AC_DEFUN([LINUX_HAVE_WRITE_BEGIN_AOP], [ AC_CACHE_VAL([ac_cv_linux_write_begin], [ AC_TRY_KBUILD( [#include ], -[simple_write_begin(NULL, NULL, 0, 0, 0, NULL, NULL);], +[struct address_space_operations _aop; +_aop.write_begin = NULL;], ac_cv_linux_write_begin=yes, ac_cv_linux_write_begin=no)]) AC_MSG_RESULT($ac_cv_linux_write_begin)