Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3028644rwb; Mon, 15 Aug 2022 16:27:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR6DZ3mcw0m/uv1Tr9OlkAJa27Wi2ZegwaNrsVRG02dXaInU3XCZVoaWJsCdHEBE0C8mZGjJ X-Received: by 2002:a17:90b:1e11:b0:1f4:ee94:6236 with SMTP id pg17-20020a17090b1e1100b001f4ee946236mr21367006pjb.63.1660605947827; Mon, 15 Aug 2022 16:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605947; cv=none; d=google.com; s=arc-20160816; b=B3PUoxj0QtkZfJbnDBBlHMF/eZBE5IDoKNEDac34wVRZVVKtm4DSqp4VLf6ZRT5El3 7HO7QB+isViNxPX2Ubf2Ub6lm8Lm8Db1s3kzIJ/yqLn9EfNvAT53MKKga6RpbQGgREIJ FZmS65S1+gaPZejRusYIrZASC3JRbsGpok8OdTgiAEElDGsPcghu9Cu1JladLcZaZqGg /3vqf1EygMCIVMXbbcIaOWtqImEhXmM743/O2PyiI6cNQzdFc3Hp1c4ZMJd3yH5b2P6d ajlGlP7svzktPeyJPG1m2U0O4cnlep4ubNelBe/3wyBiMJqrZEV1UvOLRNzo+BRpRFB3 bdkQ== 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=CXyPtkhwuGIzq+/q2xOIJ9MNClMWLANl37ZJvj0vEXtBomT+vgZzcE2Pr54kA0xLHj Se2tpYNa1vsiX5ZRmb1pNkNer7icXKKhlYYAYC14KRaH47cTm2x/jNIb1usthHqmY1uI gvJcwZ5Pu2QhnPxlYlXv+m5eNbRxDYlh4FgAPDMnPDxkT2ri1qDLMizEnqc+eC3mAKAf 9FmKcGhGemIoU7pu/sZSjHqJWMMuabwcOFSXzbz3w3FfoyZpb5rR95FTUfjJAz552y3I whaF4Ogjf5if1z+6ciUmlaYCi/3bnxVD5XAIojnQLcvDM8fVirQ0U7Om7VrAv5R1bov+ NIag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=E7JtWaZW; 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 j21-20020aa78015000000b00528a44b7df7si10576765pfi.189.2022.08.15.16.25.36; Mon, 15 Aug 2022 16:25:47 -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=E7JtWaZW; 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 S240269AbiHOXMr (ORCPT + 99 others); Mon, 15 Aug 2022 19:12:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231438AbiHOXLg (ORCPT ); Mon, 15 Aug 2022 19:11:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2B8C3FA33; Mon, 15 Aug 2022 13:00:21 -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 ams.source.kernel.org (Postfix) with ESMTPS id 35D6FB80EA8; Mon, 15 Aug 2022 20:00:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88E6CC433C1; Mon, 15 Aug 2022 20:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593618; bh=2KW1HM963k7v+bwEDDz4Yh4oQrYctMijf1hKLtDHh9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E7JtWaZWU8qFPCoSP7VvySJT052Slygkr5KssrSvKPOB5JNzDEhzJJH0wpC6pcsug QjpJDnxh4hYAR02NzhzNtvDTYK7ySkmTtUJ9vPVj6Kj/uZtL+BlxvnQXfvtZfPN6Hw 6Rdx5BJ4VO0uhGAKgcD5n69tuRg/4/fJTX71jCWM= 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.19 0297/1157] thermal/tools/tmon: Include pthread and time headers in tmon.h Date: Mon, 15 Aug 2022 19:54:13 +0200 Message-Id: <20220815180451.525116184@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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