Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: fix compilation when HAVE_GETRUSAGE is not defined
- X-seq: zsh-workers 51769
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: fix compilation when HAVE_GETRUSAGE is not defined
- Date: Sun, 21 May 2023 02:43:40 +0200
- Archived-at: <https://zsh.org/workers/51769>
- List-id: <zsh-workers.zsh.org>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author