|
4 | 4 | #[cfg(feature = "fam-wrappers")]
|
5 | 5 | mod fam_wrappers;
|
6 | 6 |
|
7 |
| -#[cfg(feature = "kvm-v4_14_0")] |
| 7 | +// Export 4.14 bindings when the feature kvm-v4_20_0 is not specified. |
| 8 | +#[cfg(all(feature = "kvm-v4_14_0", not(feature = "kvm-v4_20_0")))] |
8 | 9 | mod bindings_v4_14_0;
|
9 |
| -#[cfg(feature = "kvm-v4_20_0")] |
10 |
| -mod bindings_v4_20_0; |
11 | 10 |
|
12 |
| -// Major hack to have a default version in case no feature is specified: |
13 |
| -// If no version is specified by using the features, just use the latest one |
14 |
| -// which currently is 4.20. |
15 |
| -#[cfg(all(not(feature = "kvm-v4_14_0"), not(feature = "kvm-v4_20_0")))] |
| 11 | +// Export 4.20 bindings when kvm-v4_20_0 is specified or no kernel version |
| 12 | +// related features are specified. |
| 13 | +#[cfg(any( |
| 14 | + feature = "kvm-v4_20_0", |
| 15 | + all(not(feature = "kvm-v4_14_0"), not(feature = "kvm-v4_20_0")) |
| 16 | +))] |
16 | 17 | mod bindings_v4_20_0;
|
17 | 18 |
|
18 | 19 | pub mod bindings {
|
19 |
| - #[cfg(feature = "kvm-v4_14_0")] |
| 20 | + #[cfg(all(feature = "kvm-v4_14_0", not(feature = "kvm-v4_20_0")))] |
20 | 21 | pub use super::bindings_v4_14_0::*;
|
21 | 22 |
|
22 |
| - #[cfg(feature = "kvm-v4_20_0")] |
23 |
| - pub use super::bindings_v4_20_0::*; |
24 |
| - |
25 |
| - #[cfg(all(not(feature = "kvm-v4_14_0"), not(feature = "kvm-v4_20_0")))] |
| 23 | + #[cfg(any( |
| 24 | + feature = "kvm-v4_20_0", |
| 25 | + all(not(feature = "kvm-v4_14_0"), not(feature = "kvm-v4_20_0")) |
| 26 | + ))] |
26 | 27 | pub use super::bindings_v4_20_0::*;
|
27 |
| - |
28 | 28 | #[cfg(feature = "fam-wrappers")]
|
29 | 29 | pub use super::fam_wrappers::*;
|
30 | 30 | }
|
0 commit comments