Skip to content
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

plugins/fs/generic.c fails to build with clang - invalid C #925

Closed
q66 opened this issue Jun 30, 2023 · 2 comments · Fixed by #929
Closed

plugins/fs/generic.c fails to build with clang - invalid C #925

q66 opened this issue Jun 30, 2023 · 2 comments · Fixed by #929
Assignees

Comments

@q66
Copy link

q66 commented Jun 30, 2023

Initializers like .mkfs_options = fs_features[BD_FS_TECH_EXT2].mkfs, are not well defined C, as the designated initializer at file scope is required to be a constant expression. GCC accepts it, clang does not.

@q66
Copy link
Author

q66 commented Jun 30, 2023

quick workaround for reference: https://github.com/chimera-linux/cports/blob/master/main/libblockdev/patches/constant-init.patch

but a proper fix should probably involve moving the expressions under common macros so that they do not have to be repeated

@tbzatek tbzatek self-assigned this Jun 30, 2023
@tbzatek
Copy link
Member

tbzatek commented Jul 3, 2023

Hmm, yeah, this is unfortunate, thanks for pointing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants