Skip to content

Commit d55a9cd

Browse files
authored
Merge pull request #2202 from RT-Thread/fix_lwp
[lwp] Fix compiling warning in lwP.
2 parents 647852b + 711c923 commit d55a9cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

components/lwp/lwp_syscall.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,19 @@ typedef uint32_t id_t; /* may contain pid, uid or gid */
3030
#define PRIO_PGRP 1
3131
#define PRIO_USER 2
3232

33+
#ifndef TIMEVAL_TO_TIMESPEC
3334
#define TIMEVAL_TO_TIMESPEC(tv, ts) { \
3435
(ts)->tv_sec = (tv)->tv_sec; \
3536
(ts)->tv_nsec = (tv)->tv_usec * 1000; \
3637
}
38+
#endif
39+
40+
#ifndef TIMESPEC_TO_TIMEVAL
3741
#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
3842
(tv)->tv_sec = (ts)->tv_sec; \
3943
(tv)->tv_usec = (ts)->tv_nsec / 1000; \
4044
}
45+
#endif
4146

4247
void sys_exit(int value);
4348
ssize_t sys_read(int fd, void *buf, size_t nbyte);

0 commit comments

Comments
 (0)