From dfcb80abaec08e5c4236d3f6b515949bcdc1f1b5 Mon Sep 17 00:00:00 2001 From: Krzysztof Majzerowicz-Jaszcz Date: Wed, 5 Oct 2022 11:42:05 +0200 Subject: [PATCH] Fix for incorrect header file handling in ./configure In specific cases, header files will be included incorrectly during the configuration phase, leading to erroneous failure of affected configure step. This patch fixes this issue. Signed-off-by: Krzysztof Majzerowicz-Jaszcz --- configure.d/1_bdev_nr_sectors.conf | 2 +- configure.d/1_bdev_whole.conf | 2 +- configure.d/conf_framework.sh | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.d/1_bdev_nr_sectors.conf b/configure.d/1_bdev_nr_sectors.conf index 342e85e..40cd4af 100644 --- a/configure.d/1_bdev_nr_sectors.conf +++ b/configure.d/1_bdev_nr_sectors.conf @@ -13,7 +13,7 @@ check() { if compile_module $cur_name "bdev_nr_sectors(NULL);" "linux/genhd.h" then echo $cur_name 1 >> $config_file_path - elif compile_module $cur_name "struct block_device *bd; bd->bd_part->nr_sects;" "linux/blk_types.h" + elif compile_module $cur_name "struct block_device *bd; bd->bd_part->nr_sects;" "linux/blk_types.h" "linux/genhd.h" then echo $cur_name 2 >> $config_file_path else diff --git a/configure.d/1_bdev_whole.conf b/configure.d/1_bdev_whole.conf index 10aba5f..1d7bb0c 100644 --- a/configure.d/1_bdev_whole.conf +++ b/configure.d/1_bdev_whole.conf @@ -13,7 +13,7 @@ check() { if compile_module $cur_name "struct block_device *bd; bdev_whole(bd);" "linux/blk_types.h" "linux/genhd.h" then echo $cur_name 1 >> $config_file_path - elif compile_module $cur_name "struct block_device *bd; bd->bd_contains;" "linux/blk_types.h" + elif compile_module $cur_name "struct block_device *bd; bd->bd_contains;" "linux/blk_types.h" "linux/fs.h" then echo $cur_name 2 >> $config_file_path else diff --git a/configure.d/conf_framework.sh b/configure.d/conf_framework.sh index 4b30b14..51fb8e6 100644 --- a/configure.d/conf_framework.sh +++ b/configure.d/conf_framework.sh @@ -21,6 +21,7 @@ add_function() { } __compile_module(){ + INCLUDE="" if [ $# -gt 1 ] then i=2