Skip to content

Commit 276c395

Browse files
committed
fix: enable libc dependency with backend-bitmap feature
backend-bitmap uses libc to determine host page size in atomic_bitmap.rs. Currently, commands such as cargo build --no-default-features --features backend-bitmap fail, because libc is an optional dependency, and only enabled if we also enable backend-mmap or rawfd (which there is no reasonable setup in which this wasnt the case, explaining why no one ever ran into this). Technically the libc dependency is only needed on target_family = "unix", but there's no way to enable a feature only on a specific target, and on non-unix systems the libc call is disabled via cfg-ery, so won't cause any problems. Signed-off-by: Patrick Roy <[email protected]>
1 parent 37c9c61 commit 276c395

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ autobenches = false
1313

1414
[features]
1515
default = ["rawfd"]
16-
backend-bitmap = []
16+
backend-bitmap = ["dep:libc"]
1717
backend-mmap = ["dep:libc"]
1818
backend-atomic = ["arc-swap"]
1919
rawfd = ["dep:libc"]

0 commit comments

Comments
 (0)