summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2019-01-13 21:41:22 +0800
committerGitHub <[email protected]>2019-01-13 21:41:22 +0800
commitd55a9cd62ab936711d07c22c37fc978be896b84b (patch)
tree128e5a664d977dbf47bc5c7cb6ea796ad8aad350
parent647852b04ab0698bccac84846aae93ea2f060b2f (diff)
parent711c923614f7526404caec9954c8b541bcee1eb2 (diff)
Merge pull request #2202 from RT-Thread/fix_lwp
[lwp] Fix compiling warning in lwP.
-rw-r--r--components/lwp/lwp_syscall.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/lwp/lwp_syscall.h b/components/lwp/lwp_syscall.h
index 8389835138..a2809059f0 100644
--- a/components/lwp/lwp_syscall.h
+++ b/components/lwp/lwp_syscall.h
@@ -30,14 +30,19 @@ typedef uint32_t id_t; /* may contain pid, uid or gid */
#define PRIO_PGRP 1
#define PRIO_USER 2
+#ifndef TIMEVAL_TO_TIMESPEC
#define TIMEVAL_TO_TIMESPEC(tv, ts) { \
(ts)->tv_sec = (tv)->tv_sec; \
(ts)->tv_nsec = (tv)->tv_usec * 1000; \
}
+#endif
+
+#ifndef TIMESPEC_TO_TIMEVAL
#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
(tv)->tv_sec = (ts)->tv_sec; \
(tv)->tv_usec = (ts)->tv_nsec / 1000; \
}
+#endif
void sys_exit(int value);
ssize_t sys_read(int fd, void *buf, size_t nbyte);