diff options
author | Alon Bar-Lev <alon.barlev@gmail.com> | 2012-02-29 22:12:17 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2012-03-22 22:53:39 +0100 |
commit | f106f64b1cc228b3b937ed15a1a45bc28edefed9 (patch) | |
tree | 2b2e25a5ca6e2bf045ff41b7a5ec481140e87929 /src/compat/compat.h | |
parent | 7b49c16761b4a11f1f0846cd46bd7194392efbfa (diff) | |
download | openvpn-f106f64b1cc228b3b937ed15a1a45bc28edefed9.tar.gz openvpn-f106f64b1cc228b3b937ed15a1a45bc28edefed9.tar.xz openvpn-f106f64b1cc228b3b937ed15a1a45bc28edefed9.zip |
build: move inet_ntop(), inet_pton() emulation into compat
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r-- | src/compat/compat.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h index e9d51b8..021573e 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -26,14 +26,21 @@ #define COMPAT_H #ifdef HAVE_WINSOCK2_H -/* timeval */ #include <winsock2.h> #endif +#ifdef HAVE_WS2TCPIP_H +#include <ws2tcpip.h> +#endif + #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif + #ifndef HAVE_DIRNAME char * dirname(char *str); #endif /* HAVE_DIRNAME */ @@ -50,4 +57,12 @@ int gettimeofday (struct timeval *tv, void *tz); int daemon(int nochdir, int noclose); #endif +#ifndef HAVE_INET_NTOP +const char * inet_ntop(int af, const void *src, char *dst, socklen_t size); +#endif + +#ifndef HAVE_INET_PTON +int inet_pton(int af, const char *src, void *dst); +#endif + #endif /* COMPAT_H */ |