On 09.02.2024 13:55, Naresh Kamboju wrote:
I encountered the following build errors while compiling the selftests net test cases on Linux next-20240208 tag with clang toolchain.
Reported-by: Linux Kernel Functional Testing lkft@linaro.org
selftests/net/ip_local_port_range ip_local_port_range.c:152:17: error: use of undeclared identifier 'IPPROTO_MPTCP' 152 | .so_protocol = IPPROTO_MPTCP, | ^ ip_local_port_range.c:176:17: error: use of undeclared identifier 'IPPROTO_MPTCP' 176 | .so_protocol = IPPROTO_MPTCP, | ^ 2 errors generated.
Build link,
The glibc netinet/in.h header in the test container does not have IPPROTO_MPTCP definition. It is included first through netinet/ip.h and then __UAPI_DEF_IN_IPPROTO is set in linux/libc-compat.h -- so no definition comes from include/uapi/linux/in.h either.
# ldd --version ldd (Debian GLIBC 2.31-13+deb11u7) 2.31 ...
# grep -q IPPROTO_MPTCP /usr/include/netinet/in.h ; echo $? 1
I'll send an ifndef/define/endif IPPROTO_MPTCP patch to netdev once it's build tested. Thank you for the report.
Broken by commit 122db5e3634b ("selftests/net: add MPTCP coverage for IP_LOCAL_PORT_RANGE")
-- Linaro LKFT https://lkft.linaro.org