Skip to content

Ignore macros causing duplicate definition errors in bindgen (updates to libbpf v0.7.0) #36

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

Merged
merged 2 commits into from
Apr 11, 2022

Conversation

mdaverde
Copy link
Contributor

Due to a a macro redefinition of an enum in libbpf's src/btf.h, rust-bindgen generates duplicate bindings which causes issues.

The solution here is based on this comment and chooses to ignore parsing of those macros.

This also updates libbpf to v0.7.0 and regenerates bindings.rs. Cheers!

@alexforster alexforster merged commit 4890be6 into libbpf:master Apr 11, 2022
@alexforster
Copy link
Member

This is wonderful, thank you!

@alexforster alexforster self-requested a review April 11, 2022 21:32
@alexforster alexforster self-assigned this Apr 11, 2022
@alexforster alexforster added the enhancement New feature or request label Apr 11, 2022
@alexforster alexforster removed their request for review April 11, 2022 21:32
@alexforster alexforster removed the enhancement New feature or request label Apr 11, 2022
@alexforster alexforster removed their assignment Apr 11, 2022
@mdaverde mdaverde deleted the libbpf-v0.7.0 branch April 18, 2022 14:16
@alexforster alexforster self-assigned this Jul 11, 2022
@alexforster alexforster added bug Something isn't working enhancement New feature or request labels Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants