File 0040-LU-14073-build-fix-autoconf-test-for-clean_bdev_alia.patch of Package lustre_2_12

From cdaa22f64348b19bc9e2aaf145b58e508ea337db Mon Sep 17 00:00:00 2001
From: Mr NeilBrown <neilb@suse.de>
Date: Mon, 26 Oct 2020 13:38:21 +1100
Subject: [PATCH] LU-14073 build: fix autoconf test for clean_bdev_aliases()

From 5.9, buffer_head.h no longer provides a declaration for
'struct block_device' so the code fragment fails because the compiler
doesn't know the size of that structure.

Instead, simple pass NULL rather than the address of a real structure.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I1775572fbd56d22822b6e440fe95bd105042e7b8
Reviewed-on: https://review.whamcloud.com/40395
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aurelien Degremont <degremoa@amazon.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
---
 lustre/autoconf/lustre-core.m4 |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/lustre/autoconf/lustre-core.m4
+++ b/lustre/autoconf/lustre-core.m4
@@ -1869,8 +1869,7 @@ LB_CHECK_COMPILE([if kernel has clean_bd
 have_clean_bdev_aliases, [
 	#include <linux/buffer_head.h>
 ],[
-	struct block_device bdev;
-	clean_bdev_aliases(&bdev,1,1);
+	clean_bdev_aliases(NULL,1,1);
 ], [
 	AC_DEFINE(HAVE_CLEAN_BDEV_ALIASES, 1,
 		[kernel has clean_bdev_aliases])
openSUSE Build Service is sponsored by