This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Misc. bits (3/5)
- From: "Alfred M. Szmidt" <ams at gnu dot org>
- To: libc-alpha at sources dot redhat dot com
- Date: Fri, 10 Jun 2005 02:32:55 -0400
- Subject: Misc. bits (3/5)
Is needed for all platforms not just GNU, and it closes #966.
2005-06-10 Alfred M. Szmidt <ams@gnu.org>
[BZ #966]
* sysdeps/unix/clock_gettime.c (HANDLE_REALTIME): New macro.
--- sysdeps/unix/clock_gettime.c
+++ sysdeps/unix/clock_gettime.c
@@ -101,6 +101,14 @@
#endif
#ifndef HANDLED_REALTIME
+#define HANDLE_REALTIME \
+ do { \
+ struct timeval tv; \
+ TIMESPEC_TO_TIMEVAL (&tv, tp); \
+ \
+ retval = settimeofday (&tv, NULL); \
+ } while (0)
+
case CLOCK_REALTIME:
HANDLE_REALTIME;
break;