Merge pull request #1035 from hammerg/fix_kernel_5.11

configure: adapt to kernel 5.11
This commit is contained in:
Robert Baldyga 2021-12-31 10:56:56 +01:00 committed by GitHub
commit 1738876ff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,10 +9,10 @@
check() {
cur_name=$(basename $2)
config_file_path=$1
if compile_module $cur_name "struct block_device *bd; bd = disk_part_iter_next(NULL);" "linux/blk_types.h"
if compile_module $cur_name "struct block_device bd; bd = *disk_part_iter_next(NULL);" "linux/blk_types.h" "linux/genhd.h"
then
echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "struct hd_struct *hd; hd = disk_part_iter_next(NULL);" "linux/genhd.h"
elif compile_module $cur_name "struct hd_struct hd; hd = *disk_part_iter_next(NULL);" "linux/genhd.h"
then
echo $cur_name "2" >> $config_file_path
else