diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-02-19 02:28:42 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-02-19 02:28:42 -0500 |
commit | cc2a8228fa0b35c9aee69efa7ac657bb7a4704f9 (patch) | |
tree | f158a0f0eca440a4fa751e73ee1cf4e13a2030d2 /src/linux/wait4.c | |
parent | 52874c82a85a0f5c4b0eecd78ad8b3a349377cf3 (diff) | |
download | musl-cc2a8228fa0b35c9aee69efa7ac657bb7a4704f9.tar.gz musl-cc2a8228fa0b35c9aee69efa7ac657bb7a4704f9.tar.xz musl-cc2a8228fa0b35c9aee69efa7ac657bb7a4704f9.zip |
cleanup cruft left from when kernel and user time_t disagreed
Diffstat (limited to 'src/linux/wait4.c')
-rw-r--r-- | src/linux/wait4.c | 12 |
1 files changed, 2 insertions, 10 deletions
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 <sys/wait.h> #include <sys/resource.h> #include <string.h> @@ -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); } |