Closed autoantwort closed 1 year ago
Hi! Thanks for the bug report and PR.
All of the targets that need to be compiled require C99, so it would be better to just set the CMAKE_C_STANDARD variable at the top of CMakeLists.txt like this:
set(CMAKE_C_STANDARD 99)
Do the headers also require C99 or only the source code?
The liblzma API headers should be compatible with C89, but the internal headers used by the source code are not.
This should be fixed as of commit 4b7fb3bf41a0ca4c97fad3799949a2aa61b13b99 on master. @autoantwort can you let us know if this does not solve the bug?
This will be in a new stable 5.4.2 release in the near future. Thanks again for reporting this!
Pull request checklist
Please check if your PR fulfills the following requirements:
Pull request type
Please check the type of change your PR introduces: - [x] Bugfix - [ ] Feature - [ ] Code style update (formatting, renaming, typo fix) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior? If the compiler uses a very old c standard as default, it will fail to buildRelated Issue URL: https://github.com/microsoft/vcpkg/issues/21680#issuecomment-983342257
What is the new behavior?
Set the required c standard to C99
Does this introduce a breaking change?