mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-02-07 23:59:36 +08:00
fix compile on windows again
This commit is contained in:
parent
4e4a77ce16
commit
a9bb76d6e8
@ -399,12 +399,12 @@ int inet_pton(int af, const char *src, void *dst)
|
||||
{
|
||||
struct sockaddr_storage ss;
|
||||
int size = sizeof(ss);
|
||||
char src_copy[INET6_ADDRSTRLEN+1];
|
||||
char src_copy[max_addr_len+1];
|
||||
|
||||
ZeroMemory(&ss, sizeof(ss));
|
||||
/* stupid non-const API */
|
||||
strncpy (src_copy, src, INET6_ADDRSTRLEN+1);
|
||||
src_copy[INET6_ADDRSTRLEN] = 0;
|
||||
strncpy (src_copy, src, max_addr_len+1);
|
||||
src_copy[max_addr_len] = 0;
|
||||
|
||||
if (WSAStringToAddress(src_copy, af, NULL, (struct sockaddr *)&ss, &size) == 0) {
|
||||
switch(af) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user