diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2004-08-15 12:24:05 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2004-08-15 12:24:05 +0000 |
| commit | d1d6dbf120d891d00573ba02384c54552deac887 (patch) | |
| tree | f2fa698a97686e12fb3c2d3429ace6eaf5c6ccdb | |
| parent | 6fa534bad8e4d732aa024c459b6ddcd50ce38fb4 (diff) | |
Notes
| -rw-r--r-- | sys/compat/linux/linux_misc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 15184f59ed430..6bf235f47cbaf 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -487,6 +487,7 @@ cleanup: int linux_select(struct thread *td, struct linux_select_args *args) { + l_timeval ltv; struct timeval tv0, tv1, utv, *tvp; int error; @@ -502,8 +503,10 @@ linux_select(struct thread *td, struct linux_select_args *args) * time left. */ if (args->timeout) { - if ((error = copyin(args->timeout, &utv, sizeof(utv)))) + if ((error = copyin(args->timeout, <v, sizeof(ltv)))) goto select_out; + utv.tv_sec = ltv.tv_sec; + utv.tv_usec = ltv.tv_usec; #ifdef DEBUG if (ldebug(select)) printf(LMSG("incoming timeout (%ld/%ld)"), @@ -566,7 +569,9 @@ linux_select(struct thread *td, struct linux_select_args *args) printf(LMSG("outgoing timeout (%ld/%ld)"), utv.tv_sec, utv.tv_usec); #endif - if ((error = copyout(&utv, args->timeout, sizeof(utv)))) + ltv.tv_sec = utv.tv_sec; + ltv.tv_usec = utv.tv_usec; + if ((error = copyout(<v, args->timeout, sizeof(ltv)))) goto select_out; } |
