diff --git a/code/include/swoc/IPAddr.h b/code/include/swoc/IPAddr.h index 690ee14..50d14af 100644 --- a/code/include/swoc/IPAddr.h +++ b/code/include/swoc/IPAddr.h @@ -579,7 +579,7 @@ class IPAddr { * @param sa Destination. * @return @a sa */ - sockaddr *copy_to(sockaddr *sa); + sockaddr *copy_to(sockaddr *sa) const; /** Parse a string and load the result in @a this. * diff --git a/code/src/swoc_ip.cc b/code/src/swoc_ip.cc index 67fc9fa..0ddc9bb 100644 --- a/code/src/swoc_ip.cc +++ b/code/src/swoc_ip.cc @@ -515,7 +515,7 @@ IPAddr::operator=(IPEndpoint const &addr) { } sockaddr * -IPAddr::copy_to(sockaddr *sa) { +IPAddr::copy_to(sockaddr *sa) const { if (this->is_ip4()) { _addr._ip4.copy_to(sa); } else if (this->is_ip6()) {