wsutil: Declare ws_inet_* with extern "C"

Specify C linkage for ws_inet_pton[4|6] in order to use them
from the GUI.
This commit is contained in:
John Thacker 2021-12-27 01:02:02 -05:00
parent 23355cddf6
commit b1b1d24548
1 changed files with 8 additions and 0 deletions

View File

@ -50,6 +50,10 @@
#define WS_INET_ADDRSTRLEN 16
#define WS_INET6_ADDRSTRLEN 46
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* To check for errors set errno to zero before calling ws_inet_ntop{4,6}.
* ENOSPC is set if the result exceeds the given buffer size.
@ -66,4 +70,8 @@ ws_inet_pton4(const gchar *src, ws_in4_addr *dst);
WS_DLL_PUBLIC gboolean
ws_inet_pton6(const gchar *src, ws_in6_addr *dst);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif