From d11334a55e2f91e5f14391ed46bc4adfad6894e1 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 28 Jul 2014 15:00:25 +0200 Subject: Added replacements of inet_aton and inet_pton on systems they are not present gnulib is avoided due to keep the gnulib network replacements out of the library. --- lib/system.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/system.h') diff --git a/lib/system.h b/lib/system.h index d2e695a40c..0e7bcfbcc8 100644 --- a/lib/system.h +++ b/lib/system.h @@ -98,4 +98,15 @@ int _gnutls_ucs2_to_utf8(const void *data, size_t size, int gnutls_system_global_init(void); void gnutls_system_global_deinit(void); +#include +#ifdef _WIN32 +# define inet_aton _gnutls_inet_aton +int inet_aton(const char *cp, struct in_addr *inp); +#endif + +#ifndef HAVE_INET_PTON +# define inet_pton _gnutls_inet_pton +int inet_pton(int af, const char *src, void *dst); +#endif + #endif /* SYSTEM_H */ -- cgit v1.2.1