From 6da8066ef8034d77150cc4ee7784591cacfcd92f Mon Sep 17 00:00:00 2001 From: dmiller Date: Mon, 21 Apr 2025 20:37:16 +0000 Subject: [PATCH] Enable IPv6 in Windows libdnet build --- libdnet-stripped/CMakeLists.txt | 1 + libdnet-stripped/include/dnet_winconfig.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libdnet-stripped/CMakeLists.txt b/libdnet-stripped/CMakeLists.txt index aae89074a..0c882bb1a 100644 --- a/libdnet-stripped/CMakeLists.txt +++ b/libdnet-stripped/CMakeLists.txt @@ -40,6 +40,7 @@ if (MSVC) add_definitions(-DWIN32_LEAN_AND_MEAN) check_include_file(winsock2.h HAVE_WINSOCK2_H) if(HAVE_WINSOCK2_H) + set(HAVE_SOCKADDR_IN6 TRUE) set(HAVE_LIBWS2_32 TRUE) set(DNET_LINK_LIBS ws2_32 ${DNET_LINK_LIBS}) endif() diff --git a/libdnet-stripped/include/dnet_winconfig.h b/libdnet-stripped/include/dnet_winconfig.h index 5df6310b3..f62100b86 100644 --- a/libdnet-stripped/include/dnet_winconfig.h +++ b/libdnet-stripped/include/dnet_winconfig.h @@ -134,7 +134,7 @@ /* #undef HAVE_ROUTE_RT_MSGHDR */ /* Define if has sockaddr_in6 struct. */ -/* #undef HAVE_SOCKADDR_IN6 */ +#define HAVE_SOCKADDR_IN6 /* Define if sockaddr struct has sa_len. */ /* #undef HAVE_SOCKADDR_SA_LEN */ @@ -274,6 +274,7 @@ #ifdef HAVE_WINSOCK2_H # include +# include # include #endif