From mjl@luckie.org.nz  Wed Mar  8 02:40:08 2006
Return-Path: <mjl@luckie.org.nz>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 67DD716A423
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Mar 2006 02:40:08 +0000 (GMT)
	(envelope-from mjl@luckie.org.nz)
Received: from grunt15.ihug.co.nz (grunt15.ihug.co.nz [203.109.254.62])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D802243D58
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Mar 2006 02:40:07 +0000 (GMT)
	(envelope-from mjl@luckie.org.nz)
Received: from 203-109-220-215.bliink.ihug.co.nz (latex.plunket.luckie.org.nz) [203.109.220.215] 
	by grunt15.ihug.co.nz with esmtp (Exim 3.35 #1 (Debian))
	id 1FGoar-0006Od-00; Wed, 08 Mar 2006 15:40:05 +1300
Received: from mjl by latex.plunket.luckie.org.nz with local (Exim 4.60 (FreeBSD))
	(envelope-from <mjl@luckie.org.nz>)
	id 1FGoaq-000E0V-8h
	for FreeBSD-gnats-submit@freebsd.org; Wed, 08 Mar 2006 15:40:04 +1300
Message-Id: <E1FGoaq-000E0V-8h@latex.plunket.luckie.org.nz>
Date: Wed, 08 Mar 2006 15:40:04 +1300
From: Matthew Luckie <mjl@luckie.org.nz>
Sender: Matthew Luckie <mjl@luckie.org.nz>
Reply-To: Matthew Luckie <mjl@luckie.org.nz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] unbreak net-im/libjingle on !i386
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         94211
>Category:       ports
>Synopsis:       [patch] unbreak net-im/libjingle on !i386
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lioux
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 08 02:50:02 GMT 2006
>Closed-Date:    Mon Mar 20 04:53:10 GMT 2006
>Last-Modified:  Mon Mar 20 04:53:10 GMT 2006
>Originator:     Matthew Luckie
>Release:        FreeBSD 6.0-RELEASE-p4 alpha
>Organization:
University of Waikato
>Environment:
System: FreeBSD latex.plunket.luckie.org.nz 6.0-RELEASE-p4 FreeBSD 6.0-RELEASE-p4 #0: Thu Jan 26 22:14:57 NZDT 2006 root@latex.plunket.luckie.org.nz:/usr/src/sys/alpha/compile/latex alpha


	
>Description:
	I don't have the original compile problem, but as can be seen in the
	patch below, the implementation of SendPacket does not match the
	prototype.  It triggers on !i386 since size_t is 8 bytes, whereas
	an unsigned int is 4 bytes.

	I'll send this patch upstream.
>How-To-Repeat:
	compile on LP64 machine. 
>Fix:
--- patch-libjingle begins here ---
diff -uNr libjingle.orig/Makefile libjingle/Makefile
--- libjingle.orig/Makefile	Wed Mar  8 07:09:04 2006
+++ libjingle/Makefile	Wed Mar  8 11:57:27 2006
@@ -82,10 +82,6 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${ARCH} != "i386"
-BROKEN=		Does not compile on !i386
-.endif
-
 LDFLAGS+=-L${LOCALBASE}/lib -L${OPENSSLLIB} ${PTHREAD_LIBS}
 PKG_CONFIG?=${LOCALBASE}/bin/pkg-config
 
diff -uNr libjingle.orig/files/patch-talk__session__phone_voicechannel.cc libjingle/files/patch-talk__session__phone_voicechannel.cc
--- libjingle.orig/files/patch-talk__session__phone_voicechannel.cc	Thu Jan  1 12:00:00 1970
+++ libjingle/files/patch-talk__session__phone_voicechannel.cc	Wed Mar  8 15:23:55 2006
@@ -0,0 +1,11 @@
+--- talk/session/phone/voicechannel.cc.orig	Wed Mar  8 14:48:48 2006
++++ talk/session/phone/voicechannel.cc	Wed Mar  8 14:50:08 2006
+@@ -159,7 +159,7 @@
+   channel_->OnPacketReceived(data, (int)len);
+ }
+ 
+-void VoiceChannel::SendPacket(const void *data, unsigned int len) {
++void VoiceChannel::SendPacket(const void *data, size_t len) {
+   // SendPacket gets called from MediaEngine; send to socket
+   // MediaEngine will call us on a random thread.  The Send operation on the socket is
+   // special in that it can handle this.
--- patch-libjingle ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->lioux 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Mar 8 02:52:13 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94211 
State-Changed-From-To: open->closed 
State-Changed-By: lioux 
State-Changed-When: Mon Mar 20 04:53:07 UTC 2006 
State-Changed-Why:  
A fix has already been committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94211 
>Unformatted:
