Skip to content

Commit

Permalink
fix: make sure the const-extern-fn feature is enabled
Browse files Browse the repository at this point in the history
This was dropped in fa554bc on `main` and 674cc1f on `libc-0.2`
("Drop the libc_const_extern_fn conditional"). Unfortunately, this meant
that functions were incorrectly never getting marked `const`, which
showed up with `CMSG_SPACE` [1].

Instead of the fix here, I attempted to just use `cfg(not(libc_ctest))`
instead of a Cargo feature to enable `const` extern functions; however,
this seemed extremely problematic with `ctest` for some reason [2].
Instead, leave the feature as-is and just make it enabled by default.

Fixes: #4115 [1]

[2]: #4134
  • Loading branch information
tgross35 committed Nov 23, 2024
1 parent 666b332 commit 9f23a63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ cargo-args = ["-Zbuild-std=core"]
rustc-std-workspace-core = { version = "1.0.0", optional = true }

[features]
default = ["std"]
default = ["const-extern-fn", "std"]
std = []
rustc-dep-of-std = ["rustc-std-workspace-core"]
extra_traits = []
Expand Down

0 comments on commit 9f23a63

Please sign in to comment.