This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]