diff options
author | Etienne Dechamps <[email protected]> | 2012-08-02 15:33:31 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-08-06 11:39:49 -0700 |
commit | 476ff5a4daf804c28c87a0bb4a833e09eb01a050 (patch) | |
tree | be626adea060930c20c4efbda1636030b61da514 | |
parent | 6576a1a70dedfc7d5a5e1533a9e3e56074de4c79 (diff) |
Handle any invalidate_inodes_check prototype.
In the comments of commit 723aa3b0c2eed070f7eeadd2ce2d87f46da6d0f8,
mmatuska reported that the test for invalidate_inodes_check() is broken
if invalidate_inodes() takes two arguments.
This patch fixes the issue by resorting to another approach for
detecting invalidate_inodes_check(): is simply checks if
invalidate_inodes is defined as a macro. If it is, then it concludes
that invalidate_inodes_check() is available. This will continue to work
even if the prototype of invalidate_inodes_check() changes over time.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #148
-rw-r--r-- | config/spl-build.m4 | 7 | ||||
-rwxr-xr-x | configure | 10 |
2 files changed, 10 insertions, 7 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 7ec81e713..d7c89bc48 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -2072,9 +2072,10 @@ AC_DEFUN([SPL_AC_KERNEL_INVALIDATE_INODES], [ AC_MSG_CHECKING([whether invalidate_inodes_check() is available]) SPL_LINUX_TRY_COMPILE_SYMBOL([ #include <linux/fs.h> - ], [ - invalidate_inodes_check(NULL, 0); - ], [invalidate_inodes_check], [], [ + #ifndef invalidate_inodes + #error invalidate_inodes is not a macro + #endif + ], [ ], [invalidate_inodes_check], [], [ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_INVALIDATE_INODES_CHECK, 1, [invalidate_inodes_check() is available]) @@ -17147,13 +17147,14 @@ cat >>conftest.$ac_ext <<_ACEOF #include <linux/fs.h> + #ifndef invalidate_inodes + #error invalidate_inodes is not a macro + #endif int main (void) { - invalidate_inodes_check(NULL, 0); - ; return 0; } @@ -23343,13 +23344,14 @@ cat >>conftest.$ac_ext <<_ACEOF #include <linux/fs.h> + #ifndef invalidate_inodes + #error invalidate_inodes is not a macro + #endif int main (void) { - invalidate_inodes_check(NULL, 0); - ; return 0; } |