Skip to content

Commit 11a061e

Browse files
committed
remove compile-time Linux version check, replace with feature
The Linux version check was overly restrictive, even on systems that did have the right kernel version installed but had older headers in `/usr/include/linux`. Beyond that, this check made it more difficult to compile on a different host than what's targeted. There is now a `linux4_14` feature flag on `userfaultfd-sys`, which turns on and tests the extra constants available in that version. Since `userfaultfd` did not make use of any of those newer features, it doesn't have a feature flag yet. Applications should take care when initializing with `UffdBuilder` to specify the features and ioctls they require, so that an unsupported version will be detected at runtime. Bonus: disable default-features on the `bindgen` dependency, so we don't have to build `clap` etc.
1 parent a538a24 commit 11a061e

File tree

7 files changed

+18
-516
lines changed

7 files changed

+18
-516
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ TAGS
55
package
66
*.pyc
77
core.*
8+
Cargo.lock

0 commit comments

Comments
 (0)