OSDN Git Service

time.c: move included header for fallback case
authorPeter S. Mazinger <ps.m@gmx.net>
Sat, 16 Apr 2011 11:10:11 +0000 (13:10 +0200)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 15 Jun 2012 12:00:39 +0000 (14:00 +0200)
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc/sysdeps/linux/common/time.c

index e13b44f..cd87fb3 100644 (file)
@@ -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