diff --git a/core/Runtime.cc b/core/Runtime.cc index 8536d41d10d4a2d37783d3b43f641186fd95752a..cf54eb6d6b7fdeb60a55bd34de8883040d014291 100644 --- a/core/Runtime.cc +++ b/core/Runtime.cc @@ -301,8 +301,12 @@ CHARSTRING TTCN_Runtime::get_host_address(const CHARSTRING& type) if (ipv4 == NULL) { return CHARSTRING(""); } - } else if (type == "Ipv6") { - const IPv6Address * ipv6 = dynamic_cast<const IPv6Address*>(address); + } + if (type == "Ipv6") { + const IPv6Address * ipv6 = NULL; +#if defined(LINUX) || defined(CYGWIN17) + ipv6 = dynamic_cast<const IPv6Address*>(address); +#endif // LINUX || CYGWIN17 if (ipv6 == NULL) { return CHARSTRING(""); }