From caf2122f639b865589617d7775bea8801d18c818 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 11 May 2015 22:18:43 +0100 Subject: [PATCH] sh: times syscall nowadays takes a struct, update accordingly --- Applications/V7/cmd/sh/defs.h | 4 ++-- Applications/V7/cmd/sh/xec.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Applications/V7/cmd/sh/defs.h b/Applications/V7/cmd/sh/defs.h index aaa74597..0ac03d13 100644 --- a/Applications/V7/cmd/sh/defs.h +++ b/Applications/V7/cmd/sh/defs.h @@ -5,7 +5,7 @@ #include #include #include - +#include /* * UNIX shell */ @@ -345,7 +345,7 @@ extern void blank(void); extern void prp(void); extern void prs(const char *as); extern void prc(char c); -extern void prt(L_INT t); +extern void prt(clock_t t); extern void prn(int n); extern void itos(int n); extern int stoi(const char *icp); diff --git a/Applications/V7/cmd/sh/xec.c b/Applications/V7/cmd/sh/xec.c index bf3adbbb..98f62304 100644 --- a/Applications/V7/cmd/sh/xec.c +++ b/Applications/V7/cmd/sh/xec.c @@ -83,11 +83,11 @@ int execute(TREPTR argt, int execflg, int *pf1, int *pf2) case SYSTIMES: { - L_INT t[4]; /* FIXME: struct for this nowdays */ - times((void *)t); - prt(t[2]); + struct tms t; + times(&t); + prt(t.tms_cutime); blank(); - prt(t[3]); + prt(t.tms_cstime); newline(); } break; -- 2.34.1