From owner-freebsd-sparc64@FreeBSD.ORG Tue Jun 24 21:30:01 2008 Return-Path: Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA9041065674 for ; Tue, 24 Jun 2008 21:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A25018FC17 for ; Tue, 24 Jun 2008 21:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m5OLU1rd066283 for ; Tue, 24 Jun 2008 21:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m5OLU1dN066282; Tue, 24 Jun 2008 21:30:01 GMT (envelope-from gnats) Resent-Date: Tue, 24 Jun 2008 21:30:01 GMT Resent-Message-Id: <200806242130.m5OLU1dN066282@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-sparc64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Daniel Austin MBCS Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E683B1065674 for ; Tue, 24 Jun 2008 21:22:51 +0000 (UTC) (envelope-from dan@ultra60.dan.me.uk) Received: from ultra60.dan.me.uk (ultra60.dan.me.uk [85.116.28.8]) by mx1.freebsd.org (Postfix) with ESMTP id 7F8D78FC1E for ; Tue, 24 Jun 2008 21:22:50 +0000 (UTC) (envelope-from dan@ultra60.dan.me.uk) Received: from ultra60.dan.me.uk (localhost [127.0.0.1]) by ultra60.dan.me.uk (8.14.2/8.14.2) with ESMTP id m5OLMlXp078582; Tue, 24 Jun 2008 22:22:47 +0100 (BST) (envelope-from dan@ultra60.dan.me.uk) Received: (from root@localhost) by ultra60.dan.me.uk (8.14.2/8.14.2/Submit) id m5OLMlgU078581; Tue, 24 Jun 2008 22:22:47 +0100 (BST) (envelope-from dan) Message-Id: <200806242122.m5OLMlgU078581@ultra60.dan.me.uk> Date: Tue, 24 Jun 2008 22:22:47 +0100 (BST) From: Daniel Austin MBCS To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: freebsd-sparc64@dan.me.uk Subject: sparc64/124960: net/linphone-base does not compile on sparc64 platform. X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Austin MBCS List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2008 21:30:01 -0000 >Number: 124960 >Category: sparc64 >Synopsis: net/linphone-base does not compile on sparc64 platform. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-sparc64 >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Jun 24 21:30:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Daniel Austin MBCS >Release: FreeBSD 7.0-STABLE sparc64 >Organization: >Environment: System: FreeBSD ultra60.dan.me.uk 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Jun 24 04:02:44 BST 2008 dan@ultra60.dan.me.uk:/usr/obj/usr/src/sys/DAN sparc64 >Description: This port fails to compile due to no method of obtaining a random source on sparc64 platforms. On 32-bit platforms, some direct assembler is used. On sparc64, we take 32-bits of data from /dev/random instead (see patch) >How-To-Repeat: Attempt to compile on sparc64 platform. >Fix: Add the attached file (patch-oRTP__src__stun.c) into the 'files' folder. The patch is automatically applied when building the port. --- patch-oRTP__src__stun.c begins here --- --- oRTP/src/stun.c.orig 2007-11-16 14:37:30.000000000 +0000 +++ oRTP/src/stun.c 2008-06-24 21:54:58.000000000 +0100 @@ -768,6 +768,12 @@ asm("rdtsc" : "=A" (tick)); #elif defined(__GNUC__) && defined(__amd64__) asm("rdtsc" : "=A" (tick)); +#elif defined(__GNUC__) && defined(__sparc64__) + { + FILE *fp = fopen("/dev/random","r+"); + fread(&tick,sizeof(tick),1,fp); + fclose(fp); + } #elif defined (__SUNPRO_CC) && defined( __sparc__ ) tick = gethrtime(); #elif defined(__MACH__) --- patch-oRTP__src__stun.c ends here --- >Release-Note: >Audit-Trail: >Unformatted: