1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## const_cast_conversion.dpatch by Mehdi Dogguy <mehdi@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: constant string to char* conversion
@DPATCH@
diff -urNad libcommoncpp2-1.7.3~/src/cidr.cpp libcommoncpp2-1.7.3/src/cidr.cpp
--- libcommoncpp2-1.7.3~/src/cidr.cpp 2009-01-16 13:27:00.000000000 +0100
+++ libcommoncpp2-1.7.3/src/cidr.cpp 2010-02-01 15:15:53.000000000 +0100
@@ -202,7 +202,7 @@
#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 @@
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;
|