Date: Thu, 20 Jan 2005 23:12:35 +0800 From: Xin LI <delphij@frontfree.net> To: freebsd-hackers@FreeBSD.org Subject: rstat_timeval: Different type from timeval on 64-bit platforms Message-ID: <1106233955.1019.9.camel@spirit>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Dear folks,
During my recent overhaul of our code I found that rstat_timeval
(defined in include/rpcsvc/rstat.h) did the following:
%%%
struct rstat_timeval {
u_int tv_sec;
u_int tv_usec;
};
%%%
While we have timeval defined as:
%%%
struct timeval {
long tv_sec;
suseconds_t tv_usec;
};
%%%
And we have some potentially incorrect code, which directly cast
rstat_timeval* into timeval*, which will finally cause some wasted data
overwritten on other places.
Is there any reason rstat_timeval is not an alias of timeval? Is this
for backward compatibility or inter-operation with other operating
systems?
Thanks in advance!
Cheers,
--
Xin LI <delphij delphij net> http://www.delphij.net/
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)
iD8DBQBB78pj/cVsHxFZiIoRAmuAAJ9vh/2HdoBCwk4+/U7VDFjj0icOyACeNXvh
3/tmDkols/ElgExKapPc1Vs=
=pysw
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1106233955.1019.9.camel>
