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

bpf/selftests: test_select_reuseport_kern: remove unused header #8568

Conversation

Tropicao
Copy link
Contributor

CI test run

test_select_reuseport_kern.c is currently including <stdlib.h>, but it
does not use any definition from there.

Remove stdlib.h inclusion from test_select_reuseport_kern.c

Signed-off-by: Alexis Lothoré (eBPF Foundation) <[email protected]>
---
I stumbled upon this specific header include while trying to build selftests on
the current bpf-next_base branch, which ended with this error:

[...]
  CLNG-BPF [test_progs-cpuv4] test_select_reuseport_kern.bpf.o
In file included from progs/test_select_reuseport_kern.c:4:
/usr/include/bits/floatn.h:83:52: error: unsupported machine mode
'__TC__'
   83 | typedef _Complex float __cfloat128 __attribute__ ((__mode__
(__TC__)));
      |                                                    ^
/usr/include/bits/floatn.h:97:9: error: __float128 is not supported on
this target
   97 | typedef __float128 _Float128;

The exact error (unknown TC mode) is likely rather due to some issues in
my local build, in which I am actually cross-compiling selftests  (for
ARM64 from a x86_64 host, but not through vmtests.sh), and I still have
to sort out some other issues. But I guess it is not really right anyway
to include stdlib.h from an ebpf program, especially if it is not used,
so I am still proposing this small change.
@Tropicao Tropicao closed this Feb 27, 2025
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.

1 participant