From c470680e1ba008c05c13231dbbafd69cb9330488 Mon Sep 17 00:00:00 2001 From: Maarten Bosmans Date: Tue, 1 Mar 2011 16:06:19 +0100 Subject: Use pulsecore/arpa-inet.h to make arpa/inet.h functionality available Automatically use replacement function on platforms (win32) where not all arpa/inet.h is available natively. --- src/pulsecore/arpa-inet.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/pulsecore/arpa-inet.h (limited to 'src/pulsecore/arpa-inet.h') diff --git a/src/pulsecore/arpa-inet.h b/src/pulsecore/arpa-inet.h new file mode 100644 index 00000000..303c905b --- /dev/null +++ b/src/pulsecore/arpa-inet.h @@ -0,0 +1,23 @@ +#ifndef fooarpa_inethfoo +#define fooarpa_inethfoo + + +#if defined(HAVE_ARPA_INET_H) + +#include + +#elif defined(OS_IS_WIN32) + +/* On Windows winsock2.h (here included via pulsecore/socket.h) provides most of the functionality of arpa/inet.h, except for + * the inet_ntop and inet_pton functions, which are implemented here. */ + +#include + +const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt); + +int inet_pton(int af, const char *src, void *dst); + +#endif + + +#endif -- cgit