zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: fix compilation when HAVE_GETRUSAGE is not defined
@ 2023-05-21  0:43 Oliver Kiddle
  0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2023-05-21  0:43 UTC (permalink / raw)
  To: Zsh workers

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-21  0:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-21  0:43 PATCH: fix compilation when HAVE_GETRUSAGE is not defined Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).