Calculate returned timeval correctly when using SO_SNDTIMEO/SO_RCVTIME;
from Koji Imada <koji@math.human.nagoya-u.ac.jp> in PR/3682.
This commit is contained in:
parent
9e3c291da4
commit
372bfc7c08
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: uipc_socket.c,v 1.26 1997/01/11 05:15:01 thorpej Exp $ */
|
/* $NetBSD: uipc_socket.c,v 1.27 1997/06/11 10:04:09 kleink Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1982, 1986, 1988, 1990, 1993
|
* Copyright (c) 1982, 1986, 1988, 1990, 1993
|
||||||
|
@ -1030,7 +1030,7 @@ sogetopt(so, level, optname, mp)
|
||||||
m->m_len = sizeof(struct timeval);
|
m->m_len = sizeof(struct timeval);
|
||||||
mtod(m, struct timeval *)->tv_sec = val / hz;
|
mtod(m, struct timeval *)->tv_sec = val / hz;
|
||||||
mtod(m, struct timeval *)->tv_usec =
|
mtod(m, struct timeval *)->tv_usec =
|
||||||
(val % hz) / tick;
|
(val % hz) * tick;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue