summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-04-16 13:10:11 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:39 +0200
commit78b0d99085e043890efa3a4f311bc3b5ffd43584 (patch)
tree4cb6ee5c9ad948b95f40618554596b7228defcc1 /libc
parent34c0112854f35922ab6e109b2538a4265436113a (diff)
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>
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/common/time.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/common/time.c b/libc/sysdeps/linux/common/time.c
index e13b44f4d..cd87fb331 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