-
Notifications
You must be signed in to change notification settings - Fork 7.6k
net: http: Fix __z_http_service_define fields incorrectly ordered C++20 #91204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: http: Fix __z_http_service_define fields incorrectly ordered C++20 #91204
Conversation
Hello @Pavllick, and thank you very much for your first pull request to the Zephyr project! |
f87dad3
to
5aab8b4
Compare
Fixes an error: error: designator order for field 'http_service_desc::backlog' does not match declaration order in 'const http_service_desc' When compiled for C++ Signed-off-by: Pavel Maloletkov <[email protected]>
5aab8b4
to
276a90e
Compare
|
Thanks for the fix @Pavllick ! |
Hi @Pavllick! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
Instance of the http_service_desc struct created by the __z_http_service_define macro uses designated initializer with fields not following original http_service_desc struct order which lead to compile time exception when
#include <zephyr/net/http/service.h>
is included and project is compiled for C++20.As C++20 doesn't allow out-of-order designated initialization.
This PR fixes the order.