summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2006-03-27 11:41:17 +0000
committerWayne Davison <wayned@users.sourceforge.net>2006-03-27 11:41:17 +0000
commit41fb468fca88b04ddc360b31db08ca4a412e3ee4 (patch)
treea4ec10c6e2014a5bb48ecf57cd93873618e8df9c
parentusers/10087: no aliases for case of "in" in "case" (diff)
downloadzsh-41fb468fca88b04ddc360b31db08ca4a412e3ee4.tar
zsh-41fb468fca88b04ddc360b31db08ca4a412e3ee4.tar.gz
zsh-41fb468fca88b04ddc360b31db08ca4a412e3ee4.tar.bz2
zsh-41fb468fca88b04ddc360b31db08ca4a412e3ee4.tar.lz
zsh-41fb468fca88b04ddc360b31db08ca4a412e3ee4.tar.xz
zsh-41fb468fca88b04ddc360b31db08ca4a412e3ee4.tar.zst
zsh-41fb468fca88b04ddc360b31db08ca4a412e3ee4.zip
Fixed a compilation problem when HAVE_GETRUSAGE is defined
but HAVE_WAIT3. See the sourceforge bug report: https://sourceforge.net/tracker/?func=detail&atid=104068&aid=1262954&group_id=4068
-rw-r--r--Src/jobs.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/Src/jobs.c b/Src/jobs.c
index 4f89d0f53..f388da7fd 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -271,7 +271,7 @@ get_usage(void)
}
-#ifndef HAVE_GETRUSAGE
+#if !defined HAVE_WAIT3 || !defined HAVE_GETRUSAGE
/* Update status of process that we have just WAIT'ed for */
/**/
@@ -279,17 +279,26 @@ void
update_process(Process pn, int status)
{
struct timezone dummy_tz;
- long childs, childu;
+#ifdef HAVE_GETRUSAGE
+ struct timeval childs = child_usage.ru_stime;
+ struct timeval childu = child_usage.ru_utime;