From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9950EC433EF for ; Thu, 21 Apr 2022 00:40:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383599AbiDUAm6 (ORCPT ); Wed, 20 Apr 2022 20:42:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383580AbiDUAmn (ORCPT ); Wed, 20 Apr 2022 20:42:43 -0400 Received: from mail-40133.protonmail.ch (mail-40133.protonmail.ch [185.70.40.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4F35E0CE for ; Wed, 20 Apr 2022 17:39:55 -0700 (PDT) Date: Thu, 21 Apr 2022 00:39:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail2; t=1650501593; bh=J9EMLBfyl6d0EbP75AQ2MnE0hjjzekwUZInxavmwZss=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=qJARHcrj6Hh60qCbLVmoEFR3CuENFViDy1rPraIGl/Az3GCz8Aq5S8KZV8rEkoWYR dJfIfBrVytWgcc6VZqf0UtjCpqkv6GIdxsYDouYrxXM4+3XoG+QEsL3uwZMsVK6PQw wYw9PVFhvkocayxI26r/CLtEAbjIRj9wJiMgnL1AS3kldqrU4k48s9n+FvYx9hPLs/ cdD9roNtSs5MYXw33n//IppafEWUhRy6dTwD07lLXeigM/5EwMVcAYxqbnajpFJhiQ b2yTZGosWBP4bfVmBEJY5FYXZ8WbirlecCte/6otmdjkan8EZPZ5HkNgElhVcKKQnq fUtpFql4HMDhg== To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko From: Alexander Lobakin Cc: Alexander Lobakin , Maciej Fijalkowski , Song Liu , Kumar Kartikeya Dwivedi , bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: [PATCH v2 bpf 09/11] samples/bpf: fix include order for non-Glibc environments Message-ID: <20220421003152.339542-10-alobakin@pm.me> In-Reply-To: <20220421003152.339542-1-alobakin@pm.me> References: <20220421003152.339542-1-alobakin@pm.me> Feedback-ID: 22809121:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some standard C library implementations, e.g. Musl, ship the UAPI definitions themselves to not be dependent on the UAPI headers and their versions. Their kernel UAPI counterparts are usually guarded with some definitions which the formers set in order to avoid duplicate definitions. In such cases, include order matters. Change it in two samples: in the first, kernel UAPI ioctl definitions should go before the libc ones, and the opposite story with the second, where the kernel includes should go later to avoid struct redefinitions. Fixes: b4b8faa1ded7 ("samples/bpf: sample application and documentation for= AF_XDP sockets") Fixes: e55190f26f92 ("samples/bpf: Fix build for task_fd_query_user.c") Acked-by: Song Liu Signed-off-by: Alexander Lobakin --- samples/bpf/task_fd_query_user.c | 2 +- samples/bpf/xdpsock_user.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/samples/bpf/task_fd_query_user.c b/samples/bpf/task_fd_query_u= ser.c index c9a0ca8351fd..c0ecca01d890 100644 --- a/samples/bpf/task_fd_query_user.c +++ b/samples/bpf/task_fd_query_user.c @@ -9,11 +9,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 6f3fe30ad283..9747d47a0a8f 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c @@ -7,14 +7,15 @@ #include #include #include -#include #include #include +#include #include #include #include #include #include +#include #include #include #include -- 2.36.0