diff options
| author | Bernard Xiong <[email protected]> | 2018-02-16 22:53:02 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-02-16 22:53:02 +0800 |
| commit | 40b580b223ca1e00cb52e71c029de1f48dea689d (patch) | |
| tree | e3edeb99e2c2a7a02889aa3f2e10c2100e54c116 | |
| parent | 9255b88ca2aae976344c141291d48685c450501e (diff) | |
| parent | 9c620cb2f18fdf287302a7b4091046ce717891e6 (diff) | |
Merge pull request #1224 from armink/fix_minilibc_time
Fix minilibc time
| -rw-r--r-- | components/libc/compilers/minilibc/sys/types.h | 2 | ||||
| -rw-r--r-- | components/libc/compilers/minilibc/time.h | 10 |
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 |
