summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2020-12-16 10:13:45 +0800
committerGitHub <[email protected]>2020-12-16 10:13:45 +0800
commit95130a9000ed2611c98b5ac1bf81e80b8c466d70 (patch)
tree28bafcff9a2544711c9b07e39fd3fd1675171394 /components
parent1de6d86fb9fd0fe0809c74d98be736f0b7cc28bd (diff)
parent1ad70b20ad99833d25e0636e7065d8cdcabce388 (diff)
Merge pull request #4117 from mysterywolf/time1
[bug][keil][libc]修复开启pthread功能后keil报错的问题
Diffstat (limited to 'components')
-rw-r--r--components/libc/compilers/armlibc/sys/unistd.h2
-rw-r--r--components/libc/compilers/common/sys/time.h7
-rw-r--r--components/libc/compilers/dlib/sys/unistd.h2
3 files changed, 11 insertions, 0 deletions
diff --git a/components/libc/compilers/armlibc/sys/unistd.h b/components/libc/compilers/armlibc/sys/unistd.h
index 524de2cf83..549771e8f4 100644
--- a/components/libc/compilers/armlibc/sys/unistd.h
+++ b/components/libc/compilers/armlibc/sys/unistd.h
@@ -68,4 +68,6 @@
int isatty (int fd);
char * ttyname (int desc);
+unsigned int sleep(unsigned int seconds);
+
#endif /* _SYS_UNISTD_H */
diff --git a/components/libc/compilers/common/sys/time.h b/components/libc/compilers/common/sys/time.h
index 22f1c17f5e..952dbf32a5 100644
--- a/components/libc/compilers/common/sys/time.h
+++ b/components/libc/compilers/common/sys/time.h
@@ -36,6 +36,13 @@ struct timeval {
};
#endif /* _TIMEVAL_DEFINED */
+#ifndef _TIMESPEC
+#define _TIMESPEC
+struct timespec {
+ time_t tv_sec; /* seconds */
+ long tv_nsec; /* and nanoseconds */
+};
+#endif
struct timezone {
int tz_minuteswest; /* minutes west of Greenwich */
diff --git a/components/libc/compilers/dlib/sys/unistd.h b/components/libc/compilers/dlib/sys/unistd.h
index 9564daba8d..982a29135d 100644
--- a/components/libc/compilers/dlib/sys/unistd.h
+++ b/components/libc/compilers/dlib/sys/unistd.h
@@ -40,4 +40,6 @@
int isatty (int fd);
char * ttyname (int desc);
+unsigned int sleep(unsigned int seconds);
+
#endif /* _SYS_UNISTD_H */