Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

Commit 39072e9

Browse files
committed
Support kernel 4.19, which added file_operations.fadvise
1 parent 6923f8b commit 39072e9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ fn handle_kernel_version_cfg(bindings_path: &PathBuf) {
7171
if version >= kernel_version_code(4, 15, 0) {
7272
println!("cargo:rustc-cfg=kernel_4_15_0_or_greataer")
7373
}
74+
if version >= kernel_version_code(4, 19, 0) {
75+
println!("cargo:rustc-cfg=kernel_4_19_0_or_greataer")
76+
}
7477
}
7578

7679
fn main() {

src/chrdev.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ impl FileOperationsVtable {
157157
copy_file_range: None,
158158
dedupe_file_range: None,
159159
fallocate: None,
160+
#[cfg(kernel_4_19_0_or_greataer)]
161+
fadvise: None,
160162
fasync: None,
161163
flock: None,
162164
flush: None,

0 commit comments

Comments
 (0)