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: debian/1.4.11+dfsg-6~18 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=4cd191029b5d58f9f311cb60a31b8e7b4ded0a07;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 Reviewed-on: http://gerrit.openafs.org/766 Tested-by: Derrick Brashear --- diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index 4499a6676..fa7143e96 100644 --- a/src/cf/linux-test4.m4 +++ b/src/cf/linux-test4.m4 @@ -1102,7 +1102,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)