From nobody Fri Dec 19 19:13:05 2025 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 BD5E0C433F5 for ; Thu, 6 Oct 2022 16:29:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230453AbiJFQ3g (ORCPT ); Thu, 6 Oct 2022 12:29:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230240AbiJFQ3c (ORCPT ); Thu, 6 Oct 2022 12:29:32 -0400 Received: from vmicros1.altlinux.org (vmicros1.altlinux.org [194.107.17.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 13F9124084; Thu, 6 Oct 2022 09:29:30 -0700 (PDT) Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id 2863172C97D; Thu, 6 Oct 2022 19:29:30 +0300 (MSK) Received: from beacon.altlinux.org (unknown [193.43.10.9]) by imap.altlinux.org (Postfix) with ESMTPSA id 01DB34A4800; Thu, 6 Oct 2022 19:29:30 +0300 (MSK) From: Vitaly Chikunov To: Jiri Olsa , Arnaldo Carvalho de Melo , Ian Rogers , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ldv@altlinux.org, Vitaly Chikunov , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Subject: [PATCH] libperf: Remove reference to non-uapi header Date: Thu, 6 Oct 2022 19:29:19 +0300 Message-Id: <20221006162919.2231389-1-vt@altlinux.org> X-Mailer: git-send-email 2.33.4 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Fix build with libperf: $ gcc ./tools/lib/perf/Documentation/examples/counting.c -lperf In file included from ./tools/lib/perf/Documentation/examples/counting.c:= 8: /usr/include/perf/event.h:9:10: fatal error: linux/compiler.h: No such fi= le or directory 9 | #include | ^~~~~~~~~~~~~~~~~~ compilation terminated. Fixes: b2f10cd4e805 ("perf cpumap: Fix alignment for masks in event encodin= g") Cc: Ian Rogers Signed-off-by: Vitaly Chikunov Acked-by: Ian Rogers Reported-by: Vitaly Chikunov Reviewed-by: Dmitry V. Levin --- tools/lib/perf/include/perf/event.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/lib/perf/include/perf/event.h b/tools/lib/perf/include/p= erf/event.h index 93bf93a59c99..4f6d658bf27c 100644 --- a/tools/lib/perf/include/perf/event.h +++ b/tools/lib/perf/include/perf/event.h @@ -6,7 +6,6 @@ #include #include #include -#include #include /* pid_t */ =20 #define event_contains(obj, mem) ((obj).header.size > offsetof(typeof(obj)= , mem)) @@ -195,7 +194,7 @@ struct perf_record_mask_cpu_map64 { #pragma GCC diagnostic ignored "-Wpacked" #pragma GCC diagnostic ignored "-Wattributes" =20 -struct __packed perf_record_cpu_map_data { +struct perf_record_cpu_map_data { __u16 type; union { /* Used when type =3D=3D PERF_CPU_MAP__CPUS. */ @@ -205,7 +204,7 @@ struct __packed perf_record_cpu_map_data { /* Used when type =3D=3D PERF_CPU_MAP__MASK and long_size =3D=3D 8. */ struct perf_record_mask_cpu_map64 mask64_data; }; -}; +} __attribute__ ((__packed__)); =20 #pragma GCC diagnostic pop =20 --=20 2.33.4