- Fix build with gcc 4.2

PR:		117705
Submitted by:	Dmitry Marakasov <amdmi3@amdmi3.ru>
Approved by:	portmgr (pav)
This commit is contained in:
Martin Wilke 2007-10-31 13:08:22 +00:00
parent 5486dda5b2
commit d725436197
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=202457
2 changed files with 64 additions and 7 deletions

View file

@ -22,12 +22,6 @@ CFLAGS+= -fPIC
MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}"
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 700042
BROKEN= Broken with gcc 4.2
.endif
post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/jit/jabber-icq.example
@ -42,4 +36,4 @@ do-install:
post-install:
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View file

@ -0,0 +1,63 @@
--- jit/jit/wp_client.cpp.orig 2004-11-10 18:23:27.000000000 +0000
+++ jit/jit/wp_client.cpp 2007-10-31 03:39:39.000000000 +0000
@@ -152,22 +152,31 @@
switch(ev->getReason()){
case DisconnectedEvent::FAILED_BADUSERNAME:
+ {
e = (terror){400,"Bad username"};
+ }
break;
case DisconnectedEvent::FAILED_TURBOING:
+ {
e = (terror){503,"Turboing, connect later"};
+ }
break;
case DisconnectedEvent::FAILED_BADPASSWORD:
+ {
e = (terror){400,"Bad (non mismatched) registration password"};
+ }
break;
case DisconnectedEvent::FAILED_MISMATCH_PASSWD:
+ {
e = (terror){401,"Password does not match"};
+ }
break;
case DisconnectedEvent::FAILED_DUALLOGIN: {
+ {
/* maybe we should explicitly notify due importance */
char *body=LNG_DUAL_LOGIN;
@@ -180,21 +189,28 @@
it_deliver(sesja->ti,msg);
e = (terror){409,"Dual login"};
+ }
break;
}
case DisconnectedEvent::FAILED_LOWLEVEL:
+ {
e = (terror){502,"Low level network error"};
+ }
break;
case DisconnectedEvent::REQUESTED:
+ {
log_debug(ZONE,"Disconnected on request");
e = (terror){0,""};
+ }
break;
case DisconnectedEvent::FAILED_UNKNOWN:
default:
+ {
e = (terror){502,"Disconnected by unknown reason"};
+ }
break;
}