Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3403298rwa; Tue, 23 Aug 2022 04:19:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR5LTpleMQw951CpndeRrWFx683GdTWpS6f/JZMvRKBTepUsszUzEXt+WpAFWQOKtwwHBNjx X-Received: by 2002:a62:1641:0:b0:535:fb2e:4ae9 with SMTP id 62-20020a621641000000b00535fb2e4ae9mr21751812pfw.72.1661253547567; Tue, 23 Aug 2022 04:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253547; cv=none; d=google.com; s=arc-20160816; b=NAqX+CpbsCSBi4F+H3inoq+eHPNCa1Sb0MX4yOmAHHOEbJDZ79R7vqAOlQlV0FlSND 1ysiCYVe9dVH+prtF+YsD7h75JEcxsN0LGn5sPOjgQghCZ+QsLyOpfW/isN2Me6fi5+A Wx0fNWGR/xGuX83eOwrKN1/uKUVrbjmYJykFlN4TkCxaEyTT97EHVGIYgiYjD4Q1fiDx dEqe7hNDJop//R3Sy0NaoBdobP/ec9P5gYoiX0tZQS33l9eAs00VIG/lDmUGUGQZkzxH A3PL+lyibu3p7UvpDI3ndsYdG9lhtsQlvVj+I3/LDPbls+5wiBfsDtU1S3HlbfuGzhxC 1+9Q== 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=RDl1lhg6tRzGQXSKA27gp9oI97FhE5ladLuUr31129SjJDN5pbOjZxSj5fWaxySdPw LBYO8MeU6n7XlmRt8K32Y96YSDLtPH/SduXq6m+pMXqz2fhoCWIGy/seAPDZwouhUVTf P1cCHq9V4VJRwPlB2qf0XE8CKtx9Y7qqp5c2zwfs0E31qXNZsr5BkXFIvtLkeMS8yK6r gsYzZ0NN8X9b0/2r1G65IW19oycp6yNYXnZGCWwatMf2ZptLW+8wYsizveE6sE4GqMjH XHTPCtClDQf+PRIAgaFEwm/Xf9c6zlwIjozGQ1VTDz9kp4npKjUTLV9u+szloglPF+Bg HrkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OU1qev2k; 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 k2-20020a170902d58200b00172d0e07c02si10504278plh.392.2022.08.23.04.18.56; Tue, 23 Aug 2022 04:19:07 -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=OU1qev2k; 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 S1351400AbiHWJj3 (ORCPT + 99 others); Tue, 23 Aug 2022 05:39:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351386AbiHWJig (ORCPT ); Tue, 23 Aug 2022 05:38:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C86DB42ADC; Tue, 23 Aug 2022 01:40:55 -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 63153B81C4F; Tue, 23 Aug 2022 08:38:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACC38C433C1; Tue, 23 Aug 2022 08:38:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243933; bh=xrT7sCDqJzbwaabInFSOooM42pz6YylOw5GrLACf6Gk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OU1qev2kDNnTFj3Pj1fXjLrlVNrTmORpkIxoW56SSAyduxNzElvGxuvx9PL2sw5lq FW9UYM6GV5X1LNEO2V+9CINW1/MLV2trBj/1tDFQDQZI/sITG9XltBT6CLmyUPcyur CVyUuaX0mBooTMj6HSKpZeKJyg/6Q2qZGjqSyj/4= 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.14 058/229] thermal/tools/tmon: Include pthread and time headers in tmon.h Date: Tue, 23 Aug 2022 10:23:39 +0200 Message-Id: <20220823080055.799080088@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080053.202747790@linuxfoundation.org> References: <20220823080053.202747790@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