]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: fix conflict with <netinet/in.h>
authorOssama Othman <ossama.othman@intel.com>
Tue, 28 Jun 2022 01:02:42 +0000 (18:02 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 29 Jun 2022 03:45:43 +0000 (20:45 -0700)
commit076f9b039166919c0863225e00d86747276f23aa
treefb6a57478ab6c092ff12ce498d97158130e9a6b0
parent0f9d17c6635092aec6f36c259d582262217246e2
mptcp: fix conflict with <netinet/in.h>

Including <linux/mptcp.h> before the C library <netinet/in.h> header
causes symbol redefinition errors at compile-time due to duplicate
declarations and definitions in the <linux/in.h> header included by
<linux/mptcp.h>.

Explicitly include <netinet/in.h> before <linux/in.h> in
<linux/mptcp.h> when __KERNEL__ is not defined so that the C library
compatibility logic in <linux/libc-compat.h> is enabled when including
<linux/mptcp.h> in user space code.

Fixes: e3299abdf7d9 ("mptcp: add MPTCP_SUBFLOW_ADDRS getsockopt support")
Signed-off-by: Ossama Othman <ossama.othman@intel.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/uapi/linux/mptcp.h