From 0c3398eb8c255b6119df4dc71acedf7e35f7f75f Mon Sep 17 00:00:00 2001 From: Evgeny Date: Sun, 16 Aug 2026 12:18:07 +0300 Subject: [PATCH] =?UTF-8?q?dns:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D1=83=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B4=20Windows=20(MinGW)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - dns.c: #define uint32_t → #include (на UCRT64 stdint.h уже тянется через winsock2.h, макро даёт 'duplicate unsigned') - async_dns.c: p->IpAddress → p->IpAddress.String (IP_ADDR_STRING.IpAddress — IP_ADDRESS_STRING, не char*) --- lib/async_dns.c | 2 +- lib/dns.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/async_dns.c b/lib/async_dns.c index 86624dd4..1eef6bce 100644 --- a/lib/async_dns.c +++ b/lib/async_dns.c @@ -92,7 +92,7 @@ int adns_system_servers(struct sockaddr_in* out, int max) { int n = 0; IP_ADDR_STRING* p = &fi->DnsServerList; while (p && n < max) { - const char* s = p->IpAddress; + const char* s = p->IpAddress.String; while (*s && n < max) { while (*s == ' ' || *s == ',') s++; char tok[64]; diff --git a/lib/dns.c b/lib/dns.c index 9130a2aa..f22e0d58 100644 --- a/lib/dns.c +++ b/lib/dns.c @@ -40,11 +40,7 @@ #include /* INT_MAX */ #include /* offsetof() */ -#ifdef _WIN32 -#define uint32_t unsigned int -#else #include /* uint32_t */ -#endif #include /* malloc(3) realloc(3) free(3) rand(3) random(3) arc4random(3) */ #include /* FILE fopen(3) fclose(3) getc(3) rewind(3) */ #include /* memcpy(3) strlen(3) memmove(3) memchr(3) memcmp(3) strchr(3) strsep(3) strcspn(3) */