--- 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;
 
