- Unbreak on 6.x (with a patch to please gcc)

PR:		95228
Submitted by:	Kay Lehmann
Approved by:	Jaap Boender (maintainer), flz (mentor)
This commit is contained in:
Johan van Selst
2006-06-25 17:04:49 +00:00
parent f7e2749df2
commit e5df9d136d
2 changed files with 23 additions and 4 deletions

View File

@@ -28,10 +28,6 @@ PKGMESSAGE= ${WRKDIR}/pkg-message
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 600031
BROKEN= "Does not compile on FreeBSD >= 6.0"
.endif
pre-configure:
@${RM} ${WRKSRC}/config.cache

View File

@@ -0,0 +1,23 @@
--- kaspaliste/klib/kaspabase.cpp.orig Sat Feb 7 10:54:32 2004
+++ kaspaliste/klib/kaspabase.cpp Sun Mar 19 12:34:42 2006
@@ -184,7 +184,19 @@
LockTableItem *KaspaBase::locktable=0L;
Oid KaspaBase::getNo(Str tab, Oid o) {
- exec("select no from "+tab+" where oid="+oid2str(o));
+ char* cdummy1 = "select no from ";
+ char* cdummy2 = " where oid=";
+
+ Str sdummy1, sdummy2, sdummy_all;
+ sdummy1 = cdummy1;
+ sdummy2 = cdummy2;
+ sdummy_all = sdummy1;
+ sdummy_all += tab;
+ sdummy_all += sdummy2;
+ sdummy_all += oid2str(o);
+
+ const char* cdummy_all = sdummy_all.data();
+ exec(cdummy_all);
if(tuples())
return str2oid(getValue(0, "no"));
else