Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3409288rwa; Tue, 23 Aug 2022 04:25:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR5+Yp/Gph8pHs9hFtIEEpkANCRIxjkpKVn9MHNtNRVOSepNdJwveHUlTkMYCJvPk+V/HsAd X-Received: by 2002:a17:90b:3142:b0:1fa:f533:3191 with SMTP id ip2-20020a17090b314200b001faf5333191mr2836238pjb.193.1661253908832; Tue, 23 Aug 2022 04:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253908; cv=none; d=google.com; s=arc-20160816; b=uRNQ/L74yMLfbgQ9h+BB+c2aMvB/kke0MtiFvnRg8WdxXdWI32Yzrp76rFaBP0KoKt sVZhjbLT0XJ60VcrstTw8C2D/wOPLZPCjXm3cSx+w0/J4r0Ri2VKdBhOa33NXfEF2Lss iA/cKqLWk1VzUuZcBhtF6s1Okd2pKd/SRLK5a5SHzFngrFM4oS0+QFWi2nDqKtvP9SGS MbAWAk8FQZaTHgGTSv5DgEc33kutXM820UZyxGHB6GERpsHURd0wZfhHFNSQrxdLY27b NfDglZi8uchljXb3T7Tnwvt9UAWqXTAOLlb9Rbg82YGmWDuY4Sh3dkDFSfALN2aiGnCr hoTQ== 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=sv53D4jQZOf+cTxqSfYog0jX0V+l7GUP2F4eml2vwIM=; b=Ec4RuiPf4FKQEbf5H+sGEaNsm4NvNobJWaYFkXxb7dzlKUqfWnTMMa+parQDdtOznf 6hF0Yuun9osaVhjlRlAo8VYo9OGunKSNyTOKlccX6sY/gJ/zFWTZ55SMC2mx7n5ncp/f sK8jBBYWZYhTYzYSzuRU/viQxnZ138b4pBsn0XHvA5MI5b/UzWzRORBPgnM6BNvEqfNi 6DPBJLeIR8Xdj6Aw9MpxHR3quDL5/312et3Dt/6Iq3cAzlgfRQS+h+D1Rlrxmg1xRb+n W0YctfsUwYYKtE4PphuU0yvJLspzQ+25lOEXqcyPJxZ/esWZf4EfcgH7ViHPlVCP9TX7 euQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=P2TBSylC; 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 h192-20020a636cc9000000b0041c4d623573si16189831pgc.769.2022.08.23.04.24.58; Tue, 23 Aug 2022 04:25:08 -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=P2TBSylC; 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 S1355704AbiHWKg4 (ORCPT + 99 others); Tue, 23 Aug 2022 06:36:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354691AbiHWKWA (ORCPT ); Tue, 23 Aug 2022 06:22:00 -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 DE3546140; Tue, 23 Aug 2022 02:03:24 -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 806E1B81C53; Tue, 23 Aug 2022 09:03:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4B1CC433D6; Tue, 23 Aug 2022 09:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245402; bh=xrT7sCDqJzbwaabInFSOooM42pz6YylOw5GrLACf6Gk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P2TBSylCESE11zt+nS1HEoul/g7IBImdu7V8ysLYKX4MRuc3Ul67t4f9wiLdtDW1i ch8FriSa9n9bu0J5XEcCAlqJgvOmr/JBb48ltkKLeEBhAnz7eUp8qOfeOGGRX+crPY EY+ZXQDPoIF6v1SDR6qXVRE3jLcefQ2M/8Zdgp6M= 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 4.19 066/287] thermal/tools/tmon: Include pthread and time headers in tmon.h Date: Tue, 23 Aug 2022 10:23:55 +0200 Message-Id: <20220823080102.455071090@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@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 9e3c49c547ac..7b090a6c95b6 100644 --- a/tools/thermal/tmon/tmon.h +++ b/tools/thermal/tmon/tmon.h @@ -36,6 +36,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