Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: fix compilation when HAVE_GETRUSAGE is not defined



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