summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-02-16 22:53:02 +0800
committerGitHub <[email protected]>2018-02-16 22:53:02 +0800
commit40b580b223ca1e00cb52e71c029de1f48dea689d (patch)
treee3edeb99e2c2a7a02889aa3f2e10c2100e54c116 /components
parent9255b88ca2aae976344c141291d48685c450501e (diff)
parent9c620cb2f18fdf287302a7b4091046ce717891e6 (diff)
Merge pull request #1224 from armink/fix_minilibc_time
Fix minilibc time
Diffstat (limited to 'components')
-rw-r--r--components/libc/compilers/minilibc/sys/types.h2
-rw-r--r--components/libc/compilers/minilibc/time.h10
2 files changed, 12 insertions, 0 deletions
diff --git a/components/libc/compilers/minilibc/sys/types.h b/components/libc/compilers/minilibc/sys/types.h
index 7f27de468f..cdd17e600d 100644
--- a/components/libc/compilers/minilibc/sys/types.h
+++ b/components/libc/compilers/minilibc/sys/types.h
@@ -15,6 +15,8 @@ typedef int mode_t;
typedef unsigned long clockid_t;
typedef int pid_t;
+typedef unsigned long clock_t; /* clock() */
+
#ifndef NULL
#define NULL (0)
#endif
diff --git a/components/libc/compilers/minilibc/time.h b/components/libc/compilers/minilibc/time.h
index 2f8ad23c71..d64feba0b8 100644
--- a/components/libc/compilers/minilibc/time.h
+++ b/components/libc/compilers/minilibc/time.h
@@ -3,4 +3,14 @@
#include <sys/time.h>
+time_t mktime(struct tm * const t);
+
+char *asctime(const struct tm *timeptr);
+char *ctime(const time_t *timep);
+struct tm* localtime(const time_t* t);
+
+char *asctime_r(const struct tm *t, char *buf);
+struct tm *gmtime_r(const time_t *timep, struct tm *r);
+struct tm* localtime_r(const time_t* t, struct tm* r);
+
#endif