net: work around s_addr macro on Windows
[dpdk.git] / lib / librte_eal / windows / include / arpa / inet.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2020 Dmitry Kozlyuk
3  */
4
5 #ifndef _ARPA_INET_H_
6 #define _ARPA_INET_H_
7
8 /**
9  * @file
10  *
11  * Compatibility header
12  *
13  * Although symbols declared here are present on Windows,
14  * including <winsock2.h> would expose too much macros breaking common code.
15  */
16
17 #include <netinet/in.h>
18 #include <sys/socket.h>
19
20 /* defined in ws2_32.dll */
21 __attribute__((stdcall))
22 int
23 inet_pton(int af, const char *src, void *dst);
24
25 /* defined in ws2_32.dll */
26 __attribute__((stdcall))
27 const char *
28 inet_ntop(int af, const void *src, char *dst, socklen_t size);
29
30 #endif /* _ARPA_INET_H_ */