-
Notifications
You must be signed in to change notification settings - Fork 1.1k
CMSG_SPACE is no longer a const function #4115
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Thanks for catching this, I guess the |
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`. 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 [1]. Instead, leave the feature as-is and just make it enabled by default. Fixes: rust-lang#4115 [1]: rust-lang#4134
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: rust-lang#4115 [1] [2]: rust-lang#4134
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: rust-lang#4115 [1] [2]: rust-lang#4134 (backport <rust-lang#4134>) (cherry picked from commit 9f23a63)
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: rust-lang#4115 [1] [2]: rust-lang#4134
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: rust-lang#4115 [1] [2]: rust-lang#4134
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: rust-lang#4115 [1] [2]: rust-lang#4134 (backport <rust-lang#4134>) (cherry picked from commit 19e9e6a)
Fyi @SteveLauC this should be resolved |
The current release (0.2.165) should be yanked. It is breaking downstream builds e.g. https://github.com/aya-rs/aya/actions/runs/12023826759/job/33518337160. |
This issue was fixed in 0.2.165 🤔 |
I don't think so. 79afdce isn't contained in the 0.2.165 tag. EDIT: 940e7e7 is the backport and it is indeed in 0.2.165. However I am still seeing compilation failure. |
Looks like this is still an issue under miri in particular. I can reproduce it in aya:
|
The problem is that this feature is on by default, which is not the same as it being on always. |
Filed a new bug: #4149. |
The above was addressed in 0.2.166 https://github.com/rust-lang/libc/releases/tag/0.2.166 |
CMSG_SPACE
is supposed to be a const function. It was, until PR #4105. Now, nix fails to build with the libc-0.2 branch. It fails for both x86_64-unknown-linux-gnu and x86_64-unknown-freebsd. I bisected the regression to verify that it really was #4105.Steps to reproduce:
The text was updated successfully, but these errors were encountered: