evil: fix compilation for Windows >= Vista and gcc 4.8.1.

This commit is contained in:
Cedric Bail 2013-09-02 05:40:45 +02:00
parent 5290befb53
commit 766d1d1788
2 changed files with 9 additions and 1 deletions

View File

@ -22,6 +22,8 @@
* * modification of the management of the error
*/
#if ! _WIN32_WINNT >= _WIN32_WINNT_VISTA
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif /* HAVE_CONFIG_H */
@ -467,7 +469,6 @@ evil_inet_pton(int af, const char *src, void *dst)
return (result > -1 ? 1 : -1);
}
/* const char *
* inet_ntop4(src, dst, size)
* format an IPv4 address, more or less like inet_ntoa()
@ -643,3 +644,5 @@ const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size)
return NULL;
return result;
}
#endif

View File

@ -18,6 +18,9 @@
#define __EVIL_INET_H__
#if ! _WIN32_WINNT >= _WIN32_WINNT_VISTA
/**
* @file evil_inet.h
* @brief The file that provides functions ported from Unix in arpa/inet.h.
@ -141,6 +144,8 @@ EAPI const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size)
#define inet_ntop(x,y,z,s) evil_inet_ntop(x,y,z,s)
#endif /* _WIN32_WINNT >= _WIN32_WINNT_VISTA */
/**
* @}