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

Avoid using generated va_list type #741

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Conversation

EHfive
Copy link
Contributor

@EHfive EHfive commented Mar 26, 2024

When using libbpf-sys' bindgen feature, the generated va_list type varies on different platforms.

Use void pointer as va_list pointer type and transmute pointer of type use va_list pointer instead for cross platform support.

See rust-lang/rust-bindgen#2631

Copy link
Collaborator

@danielocfb danielocfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine, but can you please add a comment as to why that is being done? Otherwise it will get removed eventually, I am sure.

When using libbpf-sys' bindgen feature, the generated va_list type
varies on different platforms.

Use void pointer as va_list pointer type and transmute pointer of
type that uses va_list pointer for cross platform support.

See rust-lang/rust-bindgen#2631
@danielocfb danielocfb merged commit 4e5d09c into libbpf:master Mar 26, 2024
12 checks passed
@danielocfb
Copy link
Collaborator

Thanks again!

@EHfive EHfive deleted the fix-va-list branch March 26, 2024 16:43
danielocfb pushed a commit that referenced this pull request Mar 26, 2024
Add a CHANGELOG entry for #741, which fixed a function signature
mismatch causing compilation failure in certain cross-compilation
contexts.

Signed-off-by: Daniel Müller <[email protected]>
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 this pull request may close these issues.

2 participants