Skip to content

Commit e1b5730

Browse files
committed
libyang BUGFIX socket includes
1 parent 11a3dd3 commit e1b5730

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

src/ly_config.h.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @uathor Michal Vasko <[email protected]>
55
* @brief Various variables provided by cmake and compile time options.
66
*
7-
* Copyright (c) 2021 - 2024 CESNET, z.s.p.o.
7+
* Copyright (c) 2021 - 2025 CESNET, z.s.p.o.
88
*
99
* This source code is licensed under BSD 3-Clause License (the "License").
1010
* You may not use this file except in compliance with the License.
@@ -20,6 +20,12 @@
2020
/* headers are broken on Windows, which means that some of them simply *have* to come first */
2121
# include <winsock2.h>
2222
# include <ws2tcpip.h>
23+
#else
24+
# include <arpa/inet.h>
25+
# if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__)
26+
# include <netinet/in.h>
27+
# include <sys/socket.h>
28+
# endif
2329
#endif
2430

2531
/** size of fixed_mem in lyd_value, minimum is 8 (B) */

src/tree_data.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,7 @@
1616
#ifndef LY_TREE_DATA_H_
1717
#define LY_TREE_DATA_H_
1818

19-
#ifdef _WIN32
20-
# include <winsock2.h>
21-
# include <ws2tcpip.h>
22-
#else
23-
# include <arpa/inet.h>
24-
# if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__)
25-
# include <netinet/in.h>
26-
# include <sys/socket.h>
27-
# endif
28-
#endif
19+
/* socket/ip includes in libyang.h */
2920

3021
#define PCRE2_CODE_UNIT_WIDTH 8
3122

0 commit comments

Comments
 (0)