From 8a3771373c7526c2b30c4c5eb57e4f93e5ae8ea0 Mon Sep 17 00:00:00 2001 From: Mo Beigi Date: Sun, 29 Nov 2026 12:36:23 +1100 Subject: [PATCH] fix(windows): resolve Visual Studio build errors Zero-initialize the IPv6 self-test sentinel to avoid MSVC error C2078 caused by excess anonymous-union initializers. Include util-extract.c and its header in the Visual Studio project and filters to resolve the missing e_next_* symbols at link time. Fixes robertdavidgraham/masscan#824 Fixes robertdavidgraham/masscan#751 --- src/massip-addr.c | 2 +- vs10/masscan.vcxproj | 2 ++ vs10/masscan.vcxproj.filters | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/massip-addr.c b/src/massip-addr.c index dcc491f0..9174ed36 100644 --- a/src/massip-addr.c +++ b/src/massip-addr.c @@ -289,7 +289,7 @@ int ipv6address_selftest(void) {"1::2", {.ipv6 = {0x0001000000000000, 0x0000000000000002}, .version = 6}}, {"2::1", {.ipv6 = {0x0002000000000000, 0x0000000000000001}, .version = 6}}, {"1:2::", {.ipv6 = {0x0001000200000000, 0x0000000000000000}, .version = 6}}, - {NULL, {{0, 0}, 0}} + {NULL, {0}} }; int x = 0; diff --git a/vs10/masscan.vcxproj b/vs10/masscan.vcxproj index 24bd0379..6165a5d0 100644 --- a/vs10/masscan.vcxproj +++ b/vs10/masscan.vcxproj @@ -125,6 +125,7 @@ + @@ -227,6 +228,7 @@ + diff --git a/vs10/masscan.vcxproj.filters b/vs10/masscan.vcxproj.filters index a0b6d84d..57e53bad 100644 --- a/vs10/masscan.vcxproj.filters +++ b/vs10/masscan.vcxproj.filters @@ -393,6 +393,9 @@ Source Files\util + + Source Files\util + Source Files\util @@ -686,6 +689,9 @@ Source Files\util + + Source Files\util + Source Files\util