[git commit] time.c: move included header for fallback case

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Jun 15 12:00:39 UTC 2012


commit: http://git.uclibc.org/uClibc/commit/?id=78b0d99085e043890efa3a4f311bc3b5ffd43584
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 libc/sysdeps/linux/common/time.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/libc/sysdeps/linux/common/time.c b/libc/sysdeps/linux/common/time.c
index e13b44f..cd87fb3 100644
--- a/libc/sysdeps/linux/common/time.c
+++ b/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


More information about the uClibc-cvs mailing list