Skip to content
Browse files

iis: Fix inet_pton build problem

There is a function named inet_pton on windows API, with different
signature. This patch just override the windows function and point
the inet_pton to our implementation.
  • Loading branch information...
1 parent 7659894 commit a3b875a618f2862486fe3a071dff87a9ee2dfe1a @zimmerle zimmerle committed with zimmerle Nov 7, 2013
Showing with 4 additions and 1 deletion.
  1. +1 −1 apache2/msc_util.c
  2. +3 −0 apache2/msc_util.h
2 apache2/msc_util.c
@@ -836,7 +836,7 @@ char *m_strcasestr(const char *haystack, const char *needle) {
#ifdef WIN32
-int inet_pton(int family, const char *src, void *dst) {
+int my_inet_pton(int family, const char *src, void *dst) {
struct addrinfo addr;
struct sockaddr_in *in = NULL;
3 apache2/msc_util.h
@@ -51,6 +51,9 @@ int DSOLOCAL inet_pton(int family, const char *src, void *dst);
int DSOLOCAL swap_int32(int x);
+#ifdef WIN32
+#define inet_pton(x, y, z) my_inet_pton(x, y, z)
char DSOLOCAL *utf8_unicode_inplace_ex(apr_pool_t *mp, unsigned char *input, long int input_len, int *changed);

0 comments on commit a3b875a

Please sign in to comment.
Something went wrong with that request. Please try again.