Line data Source code
1 0 : /*
2 : * Copyright (c) 2019 Linaro Limited
3 : *
4 : * SPDX-License-Identifier: Apache-2.0
5 : */
6 :
7 : #ifndef ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_
8 : #define ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_
9 :
10 : #ifdef CONFIG_NEWLIB_LIBC
11 : /* Kludge to support outdated newlib version as used in SDK 0.10 for Xtensa */
12 : #include <newlib.h>
13 :
14 : #ifdef __NEWLIB__
15 : #include <sys/_timeval.h>
16 : #else
17 : #include <sys/types.h>
18 : struct timeval {
19 : time_t tv_sec;
20 : suseconds_t tv_usec;
21 : };
22 : #endif
23 :
24 : #else
25 : #include <sys/types.h>
26 : #include <sys/_timeval.h>
27 : #endif /* CONFIG_NEWLIB_LIBC */
28 :
29 : #ifdef __cplusplus
30 : extern "C" {
31 : #endif
32 :
33 0 : int gettimeofday(struct timeval *tv, void *tz);
34 :
35 : #ifdef __cplusplus
36 : }
37 : #endif
38 :
39 : #endif /* ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_ */
|