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

libbpf_legacy.h not ISO C compatible #666

Open
ripatel-fd opened this issue Mar 21, 2023 · 2 comments
Open

libbpf_legacy.h not ISO C compatible #666

ripatel-fd opened this issue Mar 21, 2023 · 2 comments

Comments

@ripatel-fd
Copy link

ripatel-fd commented Mar 21, 2023

When compiling with -Werror=pedantic:

./opt/include/bpf/libbpf_legacy.h:33:22: error: ISO C restricts enumerator values to range of ‘int’ [-Werror=pedantic]
  LIBBPF_STRICT_ALL = 0xffffffff,

caused by

LIBBPF_STRICT_ALL = 0xffffffff,

should be

-  LIBBPF_STRICT_ALL = 0xffffffff,
+  LIBBPF_STRICT_ALL = -1,
@anakryiko
Copy link
Member

I think it's better to remove highest bit and keep it look like unsigned (0x7fffffff). Are you intending to send a patch upstream to bpf@vger.kernel.org, or should I send a quick one?

@ripatel-fd
Copy link
Author

@anakryiko If you don't mind, I'll send up a patch tomorrow. About time to get my email client ready and send my first patch to Linux :)

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

No branches or pull requests

2 participants