Browse Source

time.c: move included header for fallback case

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger 13 years ago
parent
commit
78b0d99085
1 changed files with 2 additions and 4 deletions
  1. 2 4
      libc/sysdeps/linux/common/time.c

+ 2 - 4
libc/sysdeps/linux/common/time.c

@@ -9,12 +9,11 @@
 
 #include <sys/syscall.h>
 #include <time.h>
-#include <sys/time.h>
-
 
 #ifdef __NR_time
 _syscall_noerr1(time_t, time, time_t *, t)
 #else
+# include <sys/time.h>
 time_t time(time_t * t)
 {
 	time_t result;
@@ -25,9 +24,8 @@ time_t time(time_t * t)
 	 */
 	gettimeofday(&tv, NULL);
 	result = (time_t) tv.tv_sec;
-	if (t != NULL) {
+	if (t != NULL)
 		*t = result;
-	}
 	return result;
 }
 #endif