Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp987274pxb; Fri, 15 Apr 2022 17:30:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVgNUBVdmhz5l5T0ZhKoJ/IfOh8nzZT4iypzAkr1C3cR2CovJAw91q6zzGmJebhh0l4SbZ X-Received: by 2002:a63:fe4d:0:b0:39d:20ac:d7f7 with SMTP id x13-20020a63fe4d000000b0039d20acd7f7mr1120808pgj.369.1650069027862; Fri, 15 Apr 2022 17:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650069027; cv=none; d=google.com; s=arc-20160816; b=DXKnw03523VQPYxG2RPB2FKVydut8dMlm2RTdJnZoi0kB4Pkiqzrbb6engdrBsna94 Bh7qUa7NcoGUQ3aRUQYu5HKiu+1U7rBZ/Q4mL6lUNQsK8ZWrc5eGtD/5ZGdNLLFv9Hsl IxZSbFmUJiEEmrJO692fJW6EXUnqNlFrTcPmu1qJnY6zW8LMeEOvZwNLcrdVBVbfsv/J jxESiocHTLuRpU5t4RwO6+qdp3jdJ9jTFVwFp+4XY8Eq3sjRqzgHjkq8a5yz2N6j6La2 CfWd/3cOUkH0hjIb4mMsAw83AqiElJ7L6eeT4rqR1iov+yOA8WBpub+viqDGAITDpVJq sCJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=PEDAO2gdSiFRYDFQPzekiNHelP6dYcLV8W7h2o7bylk=; b=RKDiEWQng7QhKg4ZU7saSoONT1rtufQ7NrPVRui7FewCYtINuJM5sgdg0khCUJVUBS XQ6U8J769RYv5s+/heophrS02JTN3ycyFqgy1zx0L2GvxuLESViJsF9mdKnw7BXdJpbs SZjzI1QCedPx69EotI737QarZ6rMGUib7aK4zpVVBooNEAHcW7jEMCtiEN/a79MY+iRS iz3NPe1RbQzULk0HNiyvybWWc0xsgS7lIdmbTyQpaDCfKzkMrShsqWGZi6ABMeMeRqVP iooZTfeGbwI3FMWOc0T6+pIXLnrDT61Om8BlssSlQrS22fzmAtIFLYznDQAcy2gh4qy9 pZQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail2 header.b=QHoSlbFj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id nv8-20020a17090b1b4800b001bf207bdb67si3419003pjb.47.2022.04.15.17.30.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:30:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail2 header.b=QHoSlbFj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6FBDEF1E87; Fri, 15 Apr 2022 17:27:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347302AbiDNWtn (ORCPT + 99 others); Thu, 14 Apr 2022 18:49:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345500AbiDNWtb (ORCPT ); Thu, 14 Apr 2022 18:49:31 -0400 Received: from mail-40131.protonmail.ch (mail-40131.protonmail.ch [185.70.40.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 236C5C8BFD; Thu, 14 Apr 2022 15:47:02 -0700 (PDT) Date: Thu, 14 Apr 2022 22:46:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail2; t=1649976420; bh=PEDAO2gdSiFRYDFQPzekiNHelP6dYcLV8W7h2o7bylk=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=QHoSlbFjf/Kt42k1QML0xtJ8oejvL8X+tAEFv/nsHe8Ff3PQZtHTi++9Iq/59YmQS 1hDTnY12ldGaBakqr4D2UDRXQF7k6Z2xQC1OKyyExd2OINI7yc3czb+qPnHfpc/y1K jtMmDIyGRHjNUjk0UCdJQWl5TbEQ66u8D48Y585iGQ7ub2ue37KezYbyTwTYxyoYOb Dtj8qPuqHXVW6bsioTlJMuxWbUdxSIo6kyKln9JaBA4i/A9nuvFLOty4a/IpeUxrfG YuIroPBF0Jn9brL75ErSOdvivLhH2gHzVDyXFJSg/4vUUufqjTWCGOcgT6PE4Eb1Qw Xg8wGvE7ccFzg== To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko From: Alexander Lobakin Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , =?utf-8?Q?Bj=C3=B6rn_T=C3=B6pel?= , Magnus Karlsson , Jonathan Lemon , Nathan Chancellor , Nick Desaulniers , Alexander Lobakin , Dmitrii Dolgov <9erthalion6@gmail.com>, Quentin Monnet , Tiezhu Yang , Kumar Kartikeya Dwivedi , Chenbo Feng , Willem de Bruijn , Daniel Wagner , Thomas Graf , Ong Boon Leong , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, llvm@lists.linux.dev Reply-To: Alexander Lobakin Subject: [PATCH bpf-next 09/11] samples: bpf: fix include order for non-Glibc environments Message-ID: <20220414223704.341028-10-alobakin@pm.me> In-Reply-To: <20220414223704.341028-1-alobakin@pm.me> References: <20220414223704.341028-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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") 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 424718c0872c..5d3a60547f9f 100644 --- a/samples/bpf/task_fd_query_user.c +++ b/samples/bpf/task_fd_query_user.c @@ -9,10 +9,10 @@ #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 be7d2572e3e6..399b999fcec2 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.35.2