
To prevent using macros before they are defined, enfoce calling them in an appropriate order. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
26 lines
632 B
Bash
26 lines
632 B
Bash
#!/bin/bash
|
|
#
|
|
# Copyright(c) 2012-2019 Intel Corporation
|
|
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
#
|
|
|
|
. `dirname $0`/conf_framework
|
|
|
|
if compile_module "struct bio b;b.bi_iter.bi_size" "linux/bio.h"
|
|
then
|
|
add_define "CAS_BIO_BISIZE(bio) \\
|
|
bio->bi_iter.bi_size"
|
|
add_define "CAS_BIO_BIIDX(bio) \\
|
|
bio->bi_iter.bi_idx"
|
|
add_define "CAS_BIO_BISECTOR(bio) \\
|
|
bio->bi_iter.bi_sector"
|
|
elif compile_module "struct bio b;b.bi_size" "linux/bio.h"
|
|
then
|
|
add_define "CAS_BIO_BISIZE(bio) \\
|
|
bio->bi_size"
|
|
add_define "CAS_BIO_BIIDX(bio) \\
|
|
bio->bi_idx"
|
|
add_define "CAS_BIO_BISECTOR(bio) \\
|
|
bio->bi_sector"
|
|
fi
|