From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4217 invoked from network); 21 May 2023 00:44:26 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 21 May 2023 00:44:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:From:Reply-To:Cc: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=32uTosAEmw1rDpb7vXmpAMmkaxDwae1CR/WwiGUGyX0=; b=ZCKNLr8q+Sz5m/n1eu1DrAHSIW vCLcebGp4egUfhiDugud4o977EPnjNL28OGnptXrcLdZ4X4nUOwTDlpkQtvUgLmCIQFFERAqiWfXm mvP8c4aF0OOOXVN9+h590Ymfs8oKRAdTbq7ndbr39FBwoys2sTjIaeOhWP/9FBS72sXccf91AEiig VjKhBnesgvf4YRB8v2ABQGxFLQRFnBWnzjTXAxuQyD3mb9tC3UnltXfzTZgXXb/QLc+yMxMGXDaGx KkYaMXGFLOclIV8RFwqh6fUPmvjgJv+UbzCygRngV/ETEzIoXVi3mD05igz3KDURb/qtxqft+pwPh AvPOCs2g==; Received: by zero.zsh.org with local id 1q0XBS-0004I9-Cl; Sun, 21 May 2023 00:44:26 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1q0XAj-0003wo-3V; Sun, 21 May 2023 00:43:42 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1q0XAi-000ILS-5p for zsh-workers@zsh.org; Sun, 21 May 2023 02:43:40 +0200 From: Oliver Kiddle To: Zsh workers Subject: PATCH: fix compilation when HAVE_GETRUSAGE is not defined MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <70520.1684629820.1@hydra> Date: Sun, 21 May 2023 02:43:40 +0200 Message-ID: <70521-1684629820.173585@1Qyv.qhGV.Fv8y> X-Seq: 51769 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: The alternate code path for when HAVE_GETRUSAGE is not defined apparently got broken at some point. The following fixes it and also silences a compiler warning when HAVE_SETUPTERM is likewise undefined. Oliver diff --git a/Src/jobs.c b/Src/jobs.c index 4d7172550..dd7bba405 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -1032,7 +1032,7 @@ should_report_time(Job j) return 1; #else { - clktck = get_clktck(); + long clktck = get_clktck(); if ((j->procs->ti.ut + j->procs->ti.st) / clktck >= reporttime) return 1; } diff --git a/Src/utils.c b/Src/utils.c index 14ff0ed47..f13e3a79d 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -380,11 +380,13 @@ zerrmsg(FILE *file, const char *fmt, va_list ap) fflush(file); } +#ifdef HAVE_SETUPTERM /* * Wrapper for setupterm() and del_curterm(). * These are called from terminfo.c and termcap.c. */ static int term_count; /* reference count of cur_term */ +#endif /**/ mod_export void