ports/devel/commoncpp/patches/patch-src_cidr_cpp

21 lines
530 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
--- src/cidr.cpp.orig
+++ src/cidr.cpp
@@ -202,7 +202,7 @@ void IPV4Cidr::set(const char *cp)
#if defined(_MSC_VER) && _MSC_VER >= 1500
ep = (char *)strchr(cp, '/');
#else
- ep = strchr(cp, '/');
+ ep = strchr(const_cast<char *>(cp), '/');
#endif
if(ep)
@@ -332,7 +332,7 @@ void IPV6Cidr::set(const char *cp)
memset(&netmask, 0, sizeof(netmask));
bitset((bit_t *)&netmask, getMask(cp));
setString(cbuf, sizeof(cbuf), cp);
- ep = strchr(cp, '/');
+ ep = strchr(const_cast<char *>(cp), '/');
if(ep)
*ep = 0;