about summary refs log tree commit diff
path: root/sysdeps/unix/clock_settime.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/clock_settime.c')
-rw-r--r--sysdeps/unix/clock_settime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/clock_settime.c b/sysdeps/unix/clock_settime.c
index 0ef0bccc67..069336a69e 100644
--- a/sysdeps/unix/clock_settime.c
+++ b/sysdeps/unix/clock_settime.c
@@ -40,7 +40,6 @@ extern void __pthread_clock_settime (hp_timing_t offset)
 int
 clock_settime (clockid_t clock_id, const struct timespec *tp)
 {
-  struct timeval tv;
   int retval;
 
   /* Make sure the time cvalue is OK.  */
@@ -54,6 +53,7 @@ clock_settime (clockid_t clock_id, const struct timespec *tp)
     {
 #define HANDLE_REALTIME \
       do {								      \
+	struct timeval tv;						      \
 	TIMESPEC_TO_TIMEVAL (&tv, tp);					      \
 									      \
 	retval = settimeofday (&tv, NULL);				      \