Replies: 1 comment
-
This isn't really an issue with bpf2go, nor is it specifc to working with eBPF. As far as I can tell, this isn't an issue with your distribution either, since the headers look the same on my Arch machine. Welcome to the land of importing system headers! 🙂 Before I suggest anything else, let's take a look at the contents of that
I briefly searched the Linux tree, and it does seems like this is a known issue when compiling bpf: https://github.com/torvalds/linux/blob/master/samples/bpf/gnu/stubs.h. Putting an empty stubs.h in your repo and adding it to your include paths could help things along. Or, if you want to change the behaviour of that ifdef, you can specify Alternatively, when writing BPF it's often a good idea to simply copy struct definitions and such and put them in your own projects' header files (make sure to attribute GPL where needed!) to rule out external factors like these and to keep the complexity of the build setup manageable. After all, ICMP header definitions don't tend to change, if ever. :) Hope this helps. Good luck! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
New user to eBPF here. I'll really appreciate if someone can help me understand why this
go generate
is not using 64-bit libs?Full program for reference:-
Beta Was this translation helpful? Give feedback.
All reactions