Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1856850rwb; Fri, 19 Aug 2022 10:31:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR4o7rAKI73wSnRWYgiwxgX4VjqZQnwivllrOnT2RPFK/Y9+5zMVmhZo/NvgKa44pmdEC3+k X-Received: by 2002:a63:e157:0:b0:429:c287:2b9 with SMTP id h23-20020a63e157000000b00429c28702b9mr7253760pgk.258.1660930291956; Fri, 19 Aug 2022 10:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930291; cv=none; d=google.com; s=arc-20160816; b=F+lfIncOHmiaQ32/AfHoCIR7Efo1ZzsuOWTM55svEvFcaJv3rmzmd8t8UJ6rxOlfBg zGAsd0Y3QwHwTnqqU5M6RplBtzYaEf6JjOgM1LU44YFIXAMhL8qNKrNoSOjld8GPSNqP UVcF2MnOlwW/L0MZpoYhC4u3eYqNJIZWIE1y4NDmFKLjgZyPnAufY5Xv9UcQsvw2QbnN sn/+Evzjs3LSmrk++ojBOz7JpqFbEjnrT0GPDHvMgg+8CnxLz/UXi8pOO1/r4l07hu07 i7YiR4IKeEstBEK25CGr+budJSq+vWRdxoVJlOW+YplT7yF4QZQFQ/IyNXR3TfsT7qX7 I8Fw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1WZ9Nj/nfg4WeRwAKAVGKk3gmi9cO7MeTWcaV5zpY68=; b=YaL2awF4b/opx5NURAB2qm8yRs03royANNiUJ1FcG796N+wClOdlZsyO6UWHjE4Mwh JFb8/zPbXPN7bc+CNm61WW+Nc1e04oi/vzxpi79Xhw8ydEYxXLQKnkNc5oipmbPN2bF5 b4JH1I5Pf0I83BiWD0EBoRafEnre8mJVMLYI8sy46QLZ+RFT/ZGzl3dJlj/8+0WjAhGA ITa9YvfKrEdfzeFesjiwt8zZ6SuPlxPs0vj01qoAcV5ZKI/2BIU5odt6602QEyQ5mKAC 23GS4QaOuV2+1uqOag4ysRHc4sLoEoatFhFJ9cvuWgUVrgtILZA4i9WapVOnMO1UswHi SnSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yqqh7DFV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f11-20020a056a00238b00b005350ea9796esi4488155pfc.165.2022.08.19.10.31.20; Fri, 19 Aug 2022 10:31:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yqqh7DFV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351412AbiHSQHO (ORCPT + 99 others); Fri, 19 Aug 2022 12:07:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351696AbiHSQCa (ORCPT ); Fri, 19 Aug 2022 12:02:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D5ECD6328; Fri, 19 Aug 2022 08:54:20 -0700 (PDT) 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 B5B2D61759; Fri, 19 Aug 2022 15:54:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB103C433D6; Fri, 19 Aug 2022 15:54:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924460; bh=2KW1HM963k7v+bwEDDz4Yh4oQrYctMijf1hKLtDHh9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yqqh7DFVt3xlVXqqFjt09AbR9NKdjKkEphvnXCe/mEU8uc+QW7vPUBTnc1qRqrRzE plBvgdWm9JV+5xvIJ4lhBdlk2XHNi6BNo8XkaJbC+DQ1ZVWdisUPjRxVvC96gZtmHT kMbnSt32EFjhxRe67vrsAKNUFnldBmyjD37dW6wk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Markus Mayer , Florian Fainelli , Sumeet Pawnikar , =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= , Daniel Lezcano , Sasha Levin Subject: [PATCH 5.10 150/545] thermal/tools/tmon: Include pthread and time headers in tmon.h Date: Fri, 19 Aug 2022 17:38:40 +0200 Message-Id: <20220819153836.043329750@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Markus Mayer [ Upstream commit 0cf51bfe999524377fbb71becb583b4ca6d07cfc ] Include sys/time.h and pthread.h in tmon.h, so that types "pthread_mutex_t" and "struct timeval tv" are known when tmon.h references them. Without these headers, compiling tmon against musl-libc will fail with these errors: In file included from sysfs.c:31:0: tmon.h:47:8: error: unknown type name 'pthread_mutex_t' extern pthread_mutex_t input_lock; ^~~~~~~~~~~~~~~ make[3]: *** [: sysfs.o] Error 1 make[3]: *** Waiting for unfinished jobs.... In file included from tui.c:31:0: tmon.h:54:17: error: field 'tv' has incomplete type struct timeval tv; ^~ make[3]: *** [: tui.o] Error 1 make[2]: *** [Makefile:83: tmon] Error 2 Signed-off-by: Markus Mayer Acked-by: Florian Fainelli Reviewed-by: Sumeet Pawnikar Acked-by: Alejandro González Tested-by: Alejandro González Fixes: 94f69966faf8 ("tools/thermal: Introduce tmon, a tool for thermal subsystem") Link: https://lore.kernel.org/r/20220718031040.44714-1-f.fainelli@gmail.com Signed-off-by: Daniel Lezcano Signed-off-by: Sasha Levin --- tools/thermal/tmon/tmon.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/thermal/tmon/tmon.h b/tools/thermal/tmon/tmon.h index c9066ec104dd..44d16d778f04 100644 --- a/tools/thermal/tmon/tmon.h +++ b/tools/thermal/tmon/tmon.h @@ -27,6 +27,9 @@ #define NR_LINES_TZDATA 1 #define TMON_LOG_FILE "/var/tmp/tmon.log" +#include +#include + extern unsigned long ticktime; extern double time_elapsed; extern unsigned long target_temp_user; -- 2.35.1