From nobody Mon Jan 26 01:49:46 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C28D639E6D5; Tue, 20 Jan 2026 14:10:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768918244; cv=none; b=bmiKENZ+csedBIR54RWw5frnTqJ9zSifYSbcwYnMkrFyVXxJy6avqf7zurp2Y8YSBIshrLvXbOQiK8IVR/RRA9ZZOV8gENq6hVoS/Qzt0gWWJ5I9HJ4tG3bCIxhUDXP0wprNwojtc6c3HpWyrinrjEHI+ZC7JpKUjKZmo+Okv4o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768918244; c=relaxed/simple; bh=ZqrmLjkMijbcJc3IQS7wKin/D1t2uoZP1sLY/xgFZdI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=eZxjNdWciwL0ICfC+c9uVm9YtOliNhr6j/KywUV2g8pQM+FOqdKmSyZdHDNJSoqR3mOFV3XnMNdZz32/TD3uw11kUv0pSCrSSCEQXU+cPqxop5msJfcCda2hJFuMS73rEcsAfjj+3zVAG915RH2vNMcvGzOYKIFeT7/WjHa9460= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rtlQ7SdG; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=QDVif8ks; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rtlQ7SdG"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="QDVif8ks" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1768918239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qWWbJ6p/llOOq5uee8jczRuLvKm3RcJ6H6cwpERIvT8=; b=rtlQ7SdGTkp2BTbujdjmEMG4e8L4Y54KOJneDOwznalZgT0PCYNs3Y7xdC4GP1s42jFqvs OYVawGSSlmqmXaIvnte9k+7J1aO6Qc47KMMsNqYUKbHgxQy4q1vr/1B+opOMeHb13i+/Cf 57oGOwhSZP2sR5+qi6Hgy2dsGiAEvuERgBSDCO7W+Ar0fGc6BNFyE+ouDiRNAx5LGInA8U jBl9fC39QCqOOM2R8VcWrmIjz0j+XlXhpttFqtZXNU47Dvj7WLfTsYSpjvZpCml4rWwxE7 CTwlIaeVPVDGIfl05o6I1wzXGuzcXRh19tkbc4sQ4pL5yeFeZXsY8dbo0dJTAA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1768918239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qWWbJ6p/llOOq5uee8jczRuLvKm3RcJ6H6cwpERIvT8=; b=QDVif8kseiztc2+rY9NVDDg7G+ZgDVwdgyTTLRKXpOMyi8AOJaTvACt3+qnfEDXcNeaEU6 k8z+R2493jKfd/CQ== Date: Tue, 20 Jan 2026 15:10:31 +0100 Subject: [PATCH net-next v2 1/4] selftests: net: Move some UAPI header inclusions after libc ones Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260120-uapi-sockaddr-v2-1-63c319111cf6@linutronix.de> References: <20260120-uapi-sockaddr-v2-0-63c319111cf6@linutronix.de> In-Reply-To: <20260120-uapi-sockaddr-v2-0-63c319111cf6@linutronix.de> To: Eric Dumazet , Kuniyuki Iwashima , Paolo Abeni , Willem de Bruijn , "David S. Miller" , Jakub Kicinski , Simon Horman , Shuah Khan , Matthieu Baerts , Mat Martineau , Geliang Tang , =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= , =?utf-8?q?G=C3=BCnther_Noack?= , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Hao Luo , Jiri Olsa Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , linux-kselftest@vger.kernel.org, mptcp@lists.linux.dev, linux-security-module@vger.kernel.org, bpf@vger.kernel.org, libc-alpha@sourceware.org, Carlos O'Donell , Adhemerval Zanella , Rich Felker , klibc@zytor.com, Florian Weimer , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1768918237; l=6177; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=ZqrmLjkMijbcJc3IQS7wKin/D1t2uoZP1sLY/xgFZdI=; b=ckR5DvB2GszhHGd1qq5KB7GFMoHcqBtMFjspRoVG+3U1BvA4ONTzZ+DkdODqiPl1YQjsYLnrJ xEOvtkyVbdVB683EKZ0pv2XTMRcvDWNfqC1o0UKdWbg5B2QzJsgEYxc X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Interleaving inclusions of UAPI headers and libc headers is problematic. Both sets of headers define conflicting symbols. To enable their coexistence a compatibility-mechanism is in place. An upcoming change will define 'struct sockaddr' from linux/socket.h. However sys/socket.h from libc does not yet handle this case and a symbol conflict will arise. Furthermore libc-compat.h evaluates the state of the libc inclusions only once, at the point it is included first. If another problematic header from libc is included later, symbol conflicts arise. This will trigger other duplicate definitions when linux/libc-compat.h is added to linux/socket.h Move the inclusion of UAPI headers after the inclusion of the glibc ones, so the libc-compat.h continues to work correctly. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/testing/selftests/net/af_unix/diag_uid.c | 9 +++++---- tools/testing/selftests/net/busy_poller.c | 3 ++- tools/testing/selftests/net/mptcp/mptcp_diag.c | 11 ++++++----- tools/testing/selftests/net/nettest.c | 4 ++-- tools/testing/selftests/net/tcp_ao/icmps-discard.c | 6 +++--- tools/testing/selftests/net/tcp_ao/lib/netlink.c | 9 +++++---- tools/testing/selftests/net/tun.c | 5 +++-- 7 files changed, 26 insertions(+), 21 deletions(-) diff --git a/tools/testing/selftests/net/af_unix/diag_uid.c b/tools/testing= /selftests/net/af_unix/diag_uid.c index da7d50cedee6..05456a205325 100644 --- a/tools/testing/selftests/net/af_unix/diag_uid.c +++ b/tools/testing/selftests/net/af_unix/diag_uid.c @@ -5,15 +5,16 @@ #include =20 #include -#include -#include -#include -#include #include #include #include #include =20 +#include +#include +#include +#include + #include "kselftest_harness.h" =20 FIXTURE(diag_uid) diff --git a/tools/testing/selftests/net/busy_poller.c b/tools/testing/self= tests/net/busy_poller.c index 3a81f9c94795..34bd8d28808a 100644 --- a/tools/testing/selftests/net/busy_poller.c +++ b/tools/testing/selftests/net/busy_poller.c @@ -9,7 +9,6 @@ #include #include #include -#include =20 #include #include @@ -19,6 +18,8 @@ #include #include =20 +#include + #include #include =20 diff --git a/tools/testing/selftests/net/mptcp/mptcp_diag.c b/tools/testing= /selftests/net/mptcp/mptcp_diag.c index 8e0b1b8d84b6..af25ebfd2915 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_diag.c +++ b/tools/testing/selftests/net/mptcp/mptcp_diag.c @@ -1,11 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2025, Kylin Software */ =20 -#include -#include -#include -#include -#include #include #include #include @@ -17,6 +12,12 @@ #include #include =20 +#include +#include +#include +#include +#include + #ifndef IPPROTO_MPTCP #define IPPROTO_MPTCP 262 #endif diff --git a/tools/testing/selftests/net/nettest.c b/tools/testing/selftest= s/net/nettest.c index 1f5227f3d64d..71430403b50b 100644 --- a/tools/testing/selftests/net/nettest.c +++ b/tools/testing/selftests/net/nettest.c @@ -10,8 +10,6 @@ #include #include #include -#include -#include #include #include #include @@ -30,6 +28,8 @@ #include #include =20 +#include +#include #include #include #include diff --git a/tools/testing/selftests/net/tcp_ao/icmps-discard.c b/tools/tes= ting/selftests/net/tcp_ao/icmps-discard.c index 85c1a1e958c6..451ba89914c9 100644 --- a/tools/testing/selftests/net/tcp_ao/icmps-discard.c +++ b/tools/testing/selftests/net/tcp_ao/icmps-discard.c @@ -16,12 +16,12 @@ * Author: Dmitry Safonov */ #include -#include -#include -#include #include #include #include +#include +#include +#include #include "aolib.h" #include "../../../../include/linux/compiler.h" =20 diff --git a/tools/testing/selftests/net/tcp_ao/lib/netlink.c b/tools/testi= ng/selftests/net/tcp_ao/lib/netlink.c index 7f108493a29a..69a05820782a 100644 --- a/tools/testing/selftests/net/tcp_ao/lib/netlink.c +++ b/tools/testing/selftests/net/tcp_ao/lib/netlink.c @@ -1,14 +1,15 @@ // SPDX-License-Identifier: GPL-2.0 /* Original from tools/testing/selftests/net/ipsec.c */ -#include -#include -#include -#include #include #include #include #include =20 +#include +#include +#include +#include + #include "aolib.h" =20 #define MAX_PAYLOAD 2048 diff --git a/tools/testing/selftests/net/tun.c b/tools/testing/selftests/ne= t/tun.c index 0efc67b0357a..e6e4c52d538e 100644 --- a/tools/testing/selftests/net/tun.c +++ b/tools/testing/selftests/net/tun.c @@ -8,12 +8,13 @@ #include #include #include +#include +#include + #include #include #include #include -#include -#include =20 #include "kselftest_harness.h" =20 --=20 2.52.0