Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2814638rwb; Mon, 15 Aug 2022 11:54:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR7iZhdb2uF0H7pfSsDygGiHPiJV8CbnCbFQXZnL5fcxRtepy1qI32bx2qSHDrJgp34Kk0L3 X-Received: by 2002:a17:906:730c:b0:730:da74:3453 with SMTP id di12-20020a170906730c00b00730da743453mr11381073ejc.270.1660589649906; Mon, 15 Aug 2022 11:54:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660589649; cv=none; d=google.com; s=arc-20160816; b=MwLC/lGi0uIuYAVfAQWTfqSJC/bOU59vvkxOaXiSPlssbeWuEzembUjWTKG28b/Dtl J7AIG/DV5+hNv87cxmhm67GvPey0MLW9GqlGYCZJaXxvWetkWW3LdPONAX84t0YHR9G8 ROj3awRRS51KQl6Hk1c7ouOnOCWWycai5A9G/0PooidbvZfxU/liIGtmvG3QbLr6iy+C UBnJu8kwajD48OUhcUtFgRGntqiy4Nd3kqYnRz6VEXHquO5m7mu3/SKsLu7az1AyofEo oCyS15ZWaho2PfNwUydJEZYsV/ytelxPk61++UtEjcHT1zo8unyZh5OducpAcsXXAFTH pTtw== 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=E7olO7VPYeMQZ73mCrRPVnAUfxK9raK01SSuc8ntIxHZXoembTmEFt8UGMSEM4+Fas iCyaTIDpBNn0u38rN6ArbjHLraG3YWvZwwnjVxetR1CQRazNcmk8E9szQO9BTB9j5ZKs ZD67IhsFgQgj6UTM/V7KTQ5vQMY/kvaNPSLyKExX9zEKsSINM3+h+V4ezZucEy4FXCrO c/ayZ9/kewJOFz6fhBqlbAUnLAyispEnj5uWir3mev7g8qX/pqnW3qpN/X8/V6duyR5z uivxB6UG/2mssTE5RI5aChv8K9y6+gqXlalLkFmNNlrQsRdzRJqa4WbLG86CNBTYUnTs Y/kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Zkk2c62T; 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 o30-20020a509b1e000000b0043d4e0eb3c1si7911049edi.382.2022.08.15.11.53.42; Mon, 15 Aug 2022 11:54:09 -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=Zkk2c62T; 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 S243894AbiHOSrp (ORCPT + 99 others); Mon, 15 Aug 2022 14:47:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242007AbiHOSmg (ORCPT ); Mon, 15 Aug 2022 14:42:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B30E42B617; Mon, 15 Aug 2022 11:26:23 -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 71987B8107B; Mon, 15 Aug 2022 18:26:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71D4AC433D6; Mon, 15 Aug 2022 18:26:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587981; bh=2KW1HM963k7v+bwEDDz4Yh4oQrYctMijf1hKLtDHh9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zkk2c62TsBuX0e7aNqkr/lBWgKvRXc61NpsG0zABn98R+w8iG4WHVB3Kbc4CAu7be aGeuJmOlRq++jvhNf/KWVUS7UvRVe0Te0uOnnB0uqSQ8pOZqafdOXjU5hDR/PxTeYl y7JUtkw9rwlinjnE3khkmdwFbz5uqxPvoE5YwhCc= 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.15 226/779] thermal/tools/tmon: Include pthread and time headers in tmon.h Date: Mon, 15 Aug 2022 19:57:50 +0200 Message-Id: <20220815180346.956872187@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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