Skip to content

Commit 69b2bf8

Browse files
committed
libc: minimal: time.h: Don't (re)define struct timespec.
By the latest convention, libc's define struct timespec in sys/_timespec.h. This is consistent with Newlib and ensures about errors due to redefinitions. Signed-off-by: Paul Sokolovsky <[email protected]>
1 parent 66a0f0d commit 69b2bf8

File tree

1 file changed

+1
-4
lines changed
  • lib/libc/minimal/include

1 file changed

+1
-4
lines changed

lib/libc/minimal/include/time.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ struct tm {
3434
typedef int64_t time_t;
3535
typedef int32_t suseconds_t;
3636

37-
struct timespec {
38-
time_t tv_sec;
39-
long tv_nsec;
40-
};
37+
#include <sys/_timespec.h>
4138

4239
/*
4340
* Conversion between civil time and UNIX time. The companion

0 commit comments

Comments
 (0)