Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: time_t problem in macppc/dev/cuda.c
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
On Jan 11, 2009, at 11:46 AM, Wojciech Galazka wrote:
While compiling macppc kernel I ran into this
compile wg2/cuda.o
cc1: warnings being treated as errors
/n4/usr/src/sys/arch/macppc/dev/cuda.c: In function 'cuda_todr_get':
/n4/usr/src/sys/arch/macppc/dev/cuda.c:770: warning: format '%ld'
expects type 'long int', but argument 2 has type 'time_t'
the code is below
static int
cuda_todr_get(todr_chip_handle_t tch, volatile struct timeval *tvp)
{
....
DPRINTF("tod: %ld\n", tvp->tv_sec);
changed this to
DPRINTF("tod: %ld\n", (unsigned long)tvp->tv_sec);
and iseems to work
Should work just fine since cuda hands us the time as seconds since
1904 in an uint32_t which then gets adjusted to 1970.
In a related note, that means we need to find a workaround for cuda's
time overflowing before 2040 ;)
Also, pmu will have the same problem.
Both cuda and pmu should compile again by now.
have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
iQEVAwUBSWo7UcpnzkX8Yg2nAQJWxQf8CZ+NtsBpbZFeV516lP01hdMcqvSXDAgn
o+yXhtAJCqTucq5ftKR/CIJxKSOqFbWfeSi3V3JUu93NOJMV4FZjJxSK4ipnv6Wl
Jv/oK2hhfe+ntJDxE2MqXZMyyatx+Y5192rZNyVWpZgy2iQ85d0KYOm+tCrs4+dp
FNffocxJb9BFqfEQDrq0F1MLMSKHgSDHJtbPJHxzXvelb/mrEL1E7C+ntjErEDRY
n+0U5Tl5V6wfm83C5Tg5qEtXKQ1qk9BemEleEDeDj/MmcyBR7R3VRN1G7J11X4fq
69taAKblY+xrDaj28mMLQE76WbCKC0EGJYbJEhawaow0gD1mQfs61w==
=26NB
-----END PGP SIGNATURE-----
Home |
Main Index |
Thread Index |
Old Index