Zephyr API Documentation 4.0.0-rc2
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 */
35struct timeval {
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
52extern "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
Definition _timespec.h:14
_SUSECONDS_T_ suseconds_t
Definition _timespec.h:19
Definition _timeval.h:22
suseconds_t tv_usec
Definition _timeval.h:24
time_t tv_sec
Definition _timeval.h:23