Skip to contentSkip to conversation

bpf/selftests: test_select_reuseport_kern: Remove unused header

PATCH New Shung-Hsi Yu 1 participant 1 message Jan 29 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpf/selftests: test_select_reuseport_kern: Remove unused header

From: Alexis Lothoré (eBPF Foundation) <[email protected]>

commit 93cf4e537ed0c5bd9ba6cbdb2c33864547c1442f upstream.

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

[shung-hsi.yu: Fix compilation error mentioned in footer of Alexis' patch with newer glibc header:

[...]
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;

I'm not certain when the problem starts to occur, but I'm quite sure test_select_reuseport_kern.c were not meant to be using the C standard library in the first place.]

---
Tested to apply in 6.12 and 6.6. Possibly applicable further back.

---
 tools/testing/selftests/bpf/progs/test_select_reuseport_kern.c | 1 -
 1 file changed, 1 deletion(-)
tools/testing/selftests/bpf/progs/test_select_reuseport_kern.c +0 -1
index 5eb25c6ad75b..a5be3267dbb0 100644
@@ -1,7 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /* Copyright (c) 2018 Facebook */
 
-#include <stdlib.h>
 #include <linux/in.h>
 #include <linux/ip.h>
 #include <linux/ipv6.h>
Signature · 1 line
2.52.0