From cc2a8228fa0b35c9aee69efa7ac657bb7a4704f9 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 19 Feb 2011 02:28:42 -0500 Subject: [PATCH] cleanup cruft left from when kernel and user time_t disagreed --- src/linux/wait3.c | 3 +-- src/linux/wait4.c | 12 ++---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/linux/wait3.c b/src/linux/wait3.c index d1d91b05..61c73594 100644 --- a/src/linux/wait3.c +++ b/src/linux/wait3.c @@ -1,9 +1,8 @@ +#define _GNU_SOURCE #include #include #include "syscall.h" -pid_t wait4(pid_t, int *, int, struct rusage *); - pid_t wait3(int *status, int options, struct rusage *usage) { return wait4(-1, status, options, usage); diff --git a/src/linux/wait4.c b/src/linux/wait4.c index 5dd505a9..252beb0c 100644 --- a/src/linux/wait4.c +++ b/src/linux/wait4.c @@ -1,3 +1,4 @@ +#define _GNU_SOURCE #include #include #include @@ -5,14 +6,5 @@ pid_t wait4(pid_t pid, int *status, int options, struct rusage *usage) { - pid_t ret = syscall4(__NR_wait4, pid, (long)status, options, (long)usage); - /* Fixup kernel time_t... */ - if (usage) { - long kusage[4]; - memcpy(kusage, usage, sizeof kusage); - memmove((struct timeval *)usage + 2, (long *)usage + 4, sizeof *usage - 2*sizeof(struct timeval)); - usage->ru_utime = (struct timeval){ kusage[0], kusage[1] }; - usage->ru_stime = (struct timeval){ kusage[2], kusage[3] }; - } - return ret; + return syscall4(__NR_wait4, pid, (long)status, options, (long)usage); } -- 2.25.1