-
Notifications
You must be signed in to change notification settings - Fork 30
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
Compilation error with clang++ 17 #132
Comments
would you like to try opening a PR to fix it? |
I can do that. I just wanted to confirm my understanding of the needed logic change first. If you agree that I modify the python scripts to replace class with class_, I'll send a PR. |
Ecordonnier
added a commit
to Ecordonnier/libocispec
that referenced
this issue
Apr 9, 2024
ocispec/runtime_spec_schema_config_schema.h contains the following code which uses the reserved c++ keyword "class": typedef struct { char *class; int32_t priority; yajl_val _residual; unsigned int priority_present : 1; } Thus the code fails to compile with clang++ 17. Fixes containers#132 ( containers#132 ) Signed-off-by: Etienne Cordonnier <[email protected]>
See #133 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See also the original issue at containers/crun#1446
I am trying to consume libcrun in a c++ program compiled with clang++ 17 by including libcrun/container.h in "extern C" blocks.
The issue is that container.h includes ocispec/runtime_spec_schema_config_schema.h, which contains the following code which uses the reserved c++ keyword "class":
Thus the compilation fails.
Should this be fixed by replacing the "class" keyword while generating the C header-file in https://github.com/containers/libocispec/blob/main/src/ocispec/headers.py ?
The text was updated successfully, but these errors were encountered: