From 1ad70b20ad99833d25e0636e7065d8cdcabce388 Mon Sep 17 00:00:00 2001 From: mysterywolf <920369182@qq.com> Date: Fri, 4 Dec 2020 20:16:56 +0800 Subject: [PATCH] =?UTF-8?q?[keil][libc]=E9=98=B2=E6=AD=A2=E5=BC=80?= =?UTF-8?q?=E5=90=AFpthread=E5=8A=9F=E8=83=BD=E5=90=8E=20keil=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/compilers/armlibc/sys/unistd.h | 2 ++ components/libc/compilers/common/sys/time.h | 7 +++++++ components/libc/compilers/dlib/sys/unistd.h | 2 ++ 3 files changed, 11 insertions(+) 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 */