Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2929228rwb; Mon, 15 Aug 2022 14:14:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR6TIg2EiEvgAkFedqJRqg2S3yPIFmjH3836YzxA1bEl/SnHlbT6yPUKl5OfxmtE21erRVqn X-Received: by 2002:a17:90a:b010:b0:1f3:161c:30a0 with SMTP id x16-20020a17090ab01000b001f3161c30a0mr19580780pjq.243.1660598002149; Mon, 15 Aug 2022 14:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660598002; cv=none; d=google.com; s=arc-20160816; b=ovxmWdYhsYhmqxc+XlcMkXbNV/sew5AW40vJe0x0aM3o/nKcqwd9gKCb3aplJK/vh7 XmCndM7bgAuxSZLNbOK2sPEeWxFNPY/3Lz5aLuoyaAWvreDhb5prQLffy6UmESHfD1Rr ky0pGhZaUA3gvCXpVrTu+J1E1eGiiGt5kcY4RqOYTHCQhZ7IetKLKhwjWmit+Rq/neiN cVeA7gUcRIm6isM917LOXEXyDhgNhcd4lejfqAeoOLEtoUBuZSaEEtjwSLlD+fhiBs1F mX1YGmDjthG453nHpvx40OSUHggG97ItTDiACPA0YdV1VvpE9TJ2VVgrrppYKh0k9o/u TB/g== 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=dDJxzNyQpHrvzOI0LVrMH8xZetSt0MgVIf8yS5CluLL6oCbUkft7PNli98ZZ+Je9oV ODzwwOsfq1+4xoEyi/N6vIDpQpMOgZuCUnp89jJpKBMCTjr0tU5SUDhCNoVKbAfAgZgF vs9+nTP05pYQH7lzP5tZqR0wN/DzJ+bDd9zCgqlJVzmo6EXddI/5fSZvn19zjNwhIS4t ffUoX+Z/WFTHgjfEXMlfS/NEkv0osxujUGGN5swlnUf2Mj28SaGqw0Buz+abj3Yjya1J Fgpa/dHCEn6c7TrbCHxWkPcubD9ykVqpNfhFkgEucReqED9gkxeVNPPlUQgxSNuHjVRJ O5nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WtW1FsDl; 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 q24-20020a63f958000000b0041bc0b2cf83si11379786pgk.267.2022.08.15.14.13.10; Mon, 15 Aug 2022 14:13:22 -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=WtW1FsDl; 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 S1346658AbiHOUxb (ORCPT + 99 others); Mon, 15 Aug 2022 16:53:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347121AbiHOUvd (ORCPT ); Mon, 15 Aug 2022 16:51:33 -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 462A3BCC26; Mon, 15 Aug 2022 12:10:12 -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 B709CB81104; Mon, 15 Aug 2022 19:10:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 105C1C433C1; Mon, 15 Aug 2022 19:10:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590608; bh=2KW1HM963k7v+bwEDDz4Yh4oQrYctMijf1hKLtDHh9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WtW1FsDlO2Gti7+QwplS2oBJz7XOLTAAVrYIPg+FtjsoRvIihiAFlsu/UlQldJDco WrxSXUGE4rejIDCOmGMIqeuQpXWT0ZIcFjxxwO9fnDB79fL7Ni88bJweSNqSsMW0X9 2pvBQFY4+2LieIJdzaNyDggI8HZv4tHG/Y1uqG/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 5.18 0296/1095] thermal/tools/tmon: Include pthread and time headers in tmon.h Date: Mon, 15 Aug 2022 19:54:55 +0200 Message-Id: <20220815180442.013503829@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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