From 9681053dc072746575e905bd2984133a15881473 Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin Date: Sun, 23 Aug 2026 12:07:56 +0200 Subject: [PATCH] Fix -Wincompatible-pointer-types in Win32GetDnsSuffix Explicitly cast the `IP_ADAPTER_ADDRESSES_XP *` pointer to `PIP_ADAPTER_ADDRESSES` when calling `GetAdaptersAddresses` in `src/Mayaqua/Network.c`. This resolves build errors with modern Windows SDKs (e.g., 10.0.26100.0) where `PIP_ADAPTER_ADDRESSES` resolves to `IP_ADAPTER_ADDRESSES_LH *`, which compilers like Clang flag as an incompatible pointer type. --- src/Mayaqua/Network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mayaqua/Network.c b/src/Mayaqua/Network.c index 0ea87fee..496d2dd8 100644 --- a/src/Mayaqua/Network.c +++ b/src/Mayaqua/Network.c @@ -9265,12 +9265,12 @@ bool Win32GetDnsSuffix(char *domain, UINT size) info_size = 0; info = ZeroMalloc(sizeof(IP_ADAPTER_ADDRESSES_XP)); - if (GetAdaptersAddresses(AF_INET, 0, NULL, info, &info_size) == ERROR_BUFFER_OVERFLOW) + if (GetAdaptersAddresses(AF_INET, 0, NULL, (PIP_ADAPTER_ADDRESSES)info, &info_size) == ERROR_BUFFER_OVERFLOW) { Free(info); info = ZeroMalloc(info_size); } - if (GetAdaptersAddresses(AF_INET, 0, NULL, info, &info_size) != NO_ERROR) + if (GetAdaptersAddresses(AF_INET, 0, NULL, (PIP_ADAPTER_ADDRESSES)info, &info_size) != NO_ERROR) { Free(info); return false;