1
0
forked from ports/contrib

commoncpp2: Fixed compilation error

This commit is contained in:
Alan Mizrahi 2010-11-05 15:26:23 +09:00
parent a3a36270bf
commit b2de31d7d2
3 changed files with 24 additions and 1 deletions

View File

@ -1 +1,2 @@
e37b579c3e50493eb31d160582a190dd cidr-fix.patch
ca741179a728d264eb276ae471ebaf70 commoncpp2-1.7.3.tar.gz

View File

@ -7,13 +7,15 @@
name=commoncpp2
version=1.7.3
release=1
source=(http://ftp.gnu.org/pub/gnu/commoncpp/$name-$version.tar.gz)
source=(http://ftp.gnu.org/pub/gnu/commoncpp/$name-$version.tar.gz cidr-fix.patch)
build () {
cd $name-$version
# sed -i 's|! grep -q "$(libdir)" /etc/ld.so.conf|false|' Makefile.in
# export CFLAGS="${CFLAGS//-fstack-protector/}"
# export CXXFLAGS="${CXXFLAGS//-fstack-protector/}"
patch -p1 -i $SRC/cidr-fix.patch
./configure --prefix=/usr
make
make DESTDIR=$PKG install

20
commoncpp2/cidr-fix.patch Normal file
View File

@ -0,0 +1,20 @@
--- commoncpp2-1.7.3/src/cidr.cpp.orig 2010-11-05 15:16:34.745000077 +0900
+++ commoncpp2-1.7.3/src/cidr.cpp 2010-11-05 15:17:37.565000070 +0900
@@ -202,7 +202,7 @@
#if defined(_MSC_VER) && _MSC_VER >= 1500
ep = (char *)strchr(cp, '/');
#else
- ep = strchr(cp, '/');
+ ep = (char *)strchr(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 = (char *)strchr(cp, '/');
if(ep)
*ep = 0;