Zephyr API Documentation
4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
socket_types.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2021 Nordic Semiconductor
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
12
#ifndef ZEPHYR_INCLUDE_NET_SOCKET_TYPES_H_
13
#define ZEPHYR_INCLUDE_NET_SOCKET_TYPES_H_
14
22
#include <
zephyr/types.h
>
23
26
#ifdef CONFIG_NEWLIB_LIBC
27
28
#include <newlib.h>
29
30
#ifdef __NEWLIB__
31
#include <
sys/_timeval.h
>
32
#else
/* __NEWLIB__ */
33
#include <
sys/types.h
>
34
/* workaround for older Newlib 2.x, as it lacks sys/_timeval.h */
35
struct
timeval
{
36
time_t
tv_sec
;
37
suseconds_t
tv_usec
;
38
};
39
#endif
/* __NEWLIB__ */
40
41
#else
/* CONFIG_NEWLIB_LIBC */
42
43
#if defined(CONFIG_ARCH_POSIX) && defined(CONFIG_EXTERNAL_LIBC)
44
#include <bits/types/struct_timeval.h>
45
#else
46
#include <
sys/_timeval.h
>
47
#endif
48
49
#endif
/* CONFIG_NEWLIB_LIBC */
50
51
#ifdef __cplusplus
52
extern
"C"
{
53
#endif
54
55
#define zsock_timeval timeval
56
57
#ifdef __cplusplus
58
}
59
#endif
60
67
#endif
/* ZEPHYR_INCLUDE_NET_SOCKET_TYPES_H_ */
time_t
_TIME_T_ time_t
Definition
_timespec.h:14
suseconds_t
_SUSECONDS_T_ suseconds_t
Definition
_timespec.h:19
_timeval.h
types.h
types.h
timeval
Definition
_timeval.h:22
timeval::tv_usec
suseconds_t tv_usec
Definition
_timeval.h:24
timeval::tv_sec
time_t tv_sec
Definition
_timeval.h:23
zephyr
net
socket_types.h
Generated on Thu Nov 21 2024 18:02:24 for Zephyr API Documentation by
1.12.0