Merge pull request #4117 from mysterywolf/time1

[bug][keil][libc]修复开启pthread功能后keil报错的问题
This commit is contained in:
Bernard Xiong 2020-12-16 10:13:45 +08:00 committed by GitHub
commit 95130a9000
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View File

@ -68,4 +68,6 @@
int isatty (int fd); int isatty (int fd);
char * ttyname (int desc); char * ttyname (int desc);
unsigned int sleep(unsigned int seconds);
#endif /* _SYS_UNISTD_H */ #endif /* _SYS_UNISTD_H */

View File

@ -36,6 +36,13 @@ struct timeval {
}; };
#endif /* _TIMEVAL_DEFINED */ #endif /* _TIMEVAL_DEFINED */
#ifndef _TIMESPEC
#define _TIMESPEC
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* and nanoseconds */
};
#endif
struct timezone { struct timezone {
int tz_minuteswest; /* minutes west of Greenwich */ int tz_minuteswest; /* minutes west of Greenwich */

View File

@ -40,4 +40,6 @@
int isatty (int fd); int isatty (int fd);
char * ttyname (int desc); char * ttyname (int desc);
unsigned int sleep(unsigned int seconds);
#endif /* _SYS_UNISTD_H */ #endif /* _SYS_UNISTD_H */