miniupnpc/miniupnpc.c: fix compilation under WIN32

This commit is contained in:
Thomas Bernard 2014-12-01 10:31:50 +01:00
parent f43f7ee18f
commit c72591e72e
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $Id: miniupnpc.c,v 1.122 2014/11/17 22:59:54 nanard Exp $ */
/* $Id: miniupnpc.c,v 1.124 2014/12/01 09:25:11 nanard Exp $ */
/* Project : miniupnp
* Web : http://miniupnp.free.fr/
* Author : Thomas BERNARD
@ -834,17 +834,17 @@ build_absolute_url(const char * baseurl, const char * descURL,
p = strchr(s, ']');
if(p) {
/* insert %25<scope> into URL */
#ifdef IF_NAMESIZE
#if defined(IF_NAMESIZE) && !defined(_WIN32)
memmove(p + 3 + strlen(ifname), p, strlen(p) + 1);
memcpy(p, "%25", 3);
memcpy(p + 3, ifname, strlen(ifname));
n += 3 + strlen(ifname);
#else
#else /* defined(IF_NAMESIZE) && !defined(_WIN32) */
memmove(p + 3 + strlen(scope_str), p, strlen(p) + 1);
memcpy(p, "%25", 3);
memcpy(p + 3, scope_str, strlen(scope_str));
n += 3 + strlen(scope_str);
#endif
#endif /* defined(IF_NAMESIZE) && !defined(_WIN32) */
}
}
}