This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mptcp: fix compilation error without MPTCP
Fixing these errors: net/socket.c: In function '__sock_create': net/socket.c:1416:13: error: 'sysctl_mptcp_enabled' undeclared (first use in this function) 1416 | if (sysctl_mptcp_enabled && old_protocol == IPPROTO_MPTCP && | ^~~~~~~~~~~~~~~~~~~~ net/socket.c:1416:13: note: each undeclared identifier is reported only once for each function it appears in net/socket.c:1418:17: error: implicit declaration of function 'mptcp_enable_sock'; did you mean 'mptcp_del_sock'? [-Werror=implicit-function-declaration] 1418 | mptcp_enable_sock(sock->sk); | ^~~~~~~~~~~~~~~~~ | mptcp_del_sock cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:262: net/socket.o] Error 1 sysctl_mptcp_enabled is an external variable, only defined if CONFIG_MPTCP is set. We could create new functions doing nothing but the two undeclared identifiers are only used here. It looks then OK to add a new 'ifdef' here, clearly showing nothing is done when MPTCP is not enabled. Fixes: 8785d11 ("mptcp: Allow using IPPROTO_MPTCP") Reviewed-by: Christoph Paasch <cpaasch@apple.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
- Loading branch information