diff options
author | Roland McGrath <roland@gnu.org> | 2004-02-11 02:01:22 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2004-02-11 02:01:22 +0000 |
commit | ada24e76804cb94acd87277dc4c405745fd30b1c (patch) | |
tree | ddabbea4ca10a0b347acde2d06464095169bde88 /sysdeps/mach/hurd/times.c | |
parent | a921ebe75a6859cc56ccf34e6a11e4e67520b7dd (diff) | |
download | glibc-ada24e76804cb94acd87277dc4c405745fd30b1c.tar.gz glibc-ada24e76804cb94acd87277dc4c405745fd30b1c.tar.xz glibc-ada24e76804cb94acd87277dc4c405745fd30b1c.zip |
* sysdeps/mach/hurd/times.c (__times): Use union instead of cast.
* sysdeps/mach/hurd/sendmsg.c (__libc_sendmsg): Likewise.
Diffstat (limited to 'sysdeps/mach/hurd/times.c')
-rw-r--r-- | sysdeps/mach/hurd/times.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/mach/hurd/times.c b/sysdeps/mach/hurd/times.c index 542f23dc76..deab40e5ef 100644 --- a/sysdeps/mach/hurd/times.c +++ b/sysdeps/mach/hurd/times.c @@ -1,5 +1,5 @@ /* Return CPU and real time used by process and its children. Hurd version. - Copyright (C) 2001,2002,2003 Free Software Foundation, Inc. + Copyright (C) 2001,2002,2003,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -43,7 +43,7 @@ __times (struct tms *tms) struct task_basic_info bi; struct task_thread_times_info tti; mach_msg_type_number_t count; - time_value_t now; + union { time_value_t tvt; struct timeval tv; } now; error_t err; count = TASK_BASIC_INFO_COUNT; @@ -66,10 +66,10 @@ __times (struct tms *tms) /* XXX This can't be implemented until getrusage(RUSAGE_CHILDREN) can be. */ tms->tms_cutime = tms->tms_cstime = 0; - if (__gettimeofday ((struct timeval *) &now, NULL) < 0) + if (__gettimeofday (&now.tv, NULL) < 0) return -1; - return (clock_from_time_value (&now) + return (clock_from_time_value (&now.tvt) - clock_from_time_value (&bi.creation_time)); } weak_alias (__times, times) |