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 05874C46467 for ; Wed, 4 Jan 2023 19:42:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240173AbjADTmr (ORCPT ); Wed, 4 Jan 2023 14:42:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231234AbjADTmg (ORCPT ); Wed, 4 Jan 2023 14:42:36 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9F78DC1; Wed, 4 Jan 2023 11:42:35 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0E468617F7; Wed, 4 Jan 2023 19:42:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45878C433EF; Wed, 4 Jan 2023 19:42:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672861354; bh=UHfk10VmRyhzrHAbPtPOJisE7qOppsAydAy+Wc6k6FU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fMYHmLy4bqN8unmX2KcmxsIiWFxfBaXJ/e3qr3HoV+XSO7SCX0y7FxYyPtmqY1zKb NHQpfGAc+TJmHUZfTpRRP9gV41BRTt+9DCkpSXYONpdB3w/fzfmJg7BiWJb5/7tb8+ jRZVWrBrzbrhHf8uuLcmCAOVQ5GxNKJOD3oO5RUbc9nlCt9W+CJbOKBDKN4gBIYEo8 EcuzxTxMU0BmwHEPcyVZYK6ko2/7Fgh7f94umlgIWWqBx0IyXc3XodgpS8djD11cPn edze6NqCZWyWmWmYgJfqvTFQSwfDUg1KLrBXCZM2xoQ1wHfofuvIRkelCeavWwACYL j2nHvv4GncH6A== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 9F66740468; Wed, 4 Jan 2023 16:42:31 -0300 (-03) Date: Wed, 4 Jan 2023 16:42:31 -0300 From: Arnaldo Carvalho de Melo To: Jesus Sanchez-Palencia Cc: linux-perf-users@vger.kernel.org, Mark Rutland , Namhyung Kim , Jiri Olsa , Alexander Shishkin , Arnaldo Carvalho de Melo , Ian Rogers , linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf: Add missing sys/types.h include Message-ID: References: <20230104182313.3164736-1-jesussanp@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Jan 04, 2023 at 04:13:47PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, Jan 04, 2023 at 10:23:13AM -0800, Jesus Sanchez-Palencia escreveu: > > Not all libc implementations define ssize_t as part of stdio.h like > > glibc does since the standard only requires this type to be defined by > > unistd.h and sys/types.h. For this reason the perf build is currently > > broken for toolchains based on uClibc, for instance. > > > > Include sys/types.h explicitly to fix that. This is a follow up to > > commit 378ef0f5d9d7 ("perf build: Use libtraceevent from the system"). > > Do you mean this problem started with the 378ef0f5d9d7 commit? If so > then this is the fase for adding: Yeah, it was: tools/perf/util/trace-event.h /usr/include/traceevent/event_parse.h # This got removed from util/trace-event.h in 378ef0f5d9d7 /usr/include/regex.h /usr/include/sys/types.h typedef __ssize_t ssize_t; So sys/types.h was _always_ missing in tools/perf/util/trace-event.h, that got it by luck. I'm adding these details and the Fixes tag pointed to that 378ef0f5d9d7 commit. For the curious: http://vger.kernel.org/~acme/perf/size_t_from_trace-event.h.ps Using an old tool I wrote around graphviz :-) - Arnaldo > Fixes: 378ef0f5d9d7 ("perf build: Use libtraceevent from the system") > > To this patch, ok? > > Signed-off-by: Jesus Sanchez-Palencia > > --- > > tools/perf/util/trace-event.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h > > index add6c5d9531c..9b3cd79cca12 100644 > > --- a/tools/perf/util/trace-event.h > > +++ b/tools/perf/util/trace-event.h > > @@ -4,6 +4,7 @@ > > > > #include > > #include > > +#include > > #include > > > > struct evlist; > > -- > > 2.39.0.314.g84b9a713c41-goog