Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Feb 2005 21:18:44 +0100 (CET)
From:      Johan van Selst <johans@stack.nl>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/77612: Unbreak audio/xsidplay on FreeBSD >= 5.x
Message-ID:  <20050216201844.A067D171DF@mud.stack.nl>
Resent-Message-ID: <200502162020.j1GKKB6A082677@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         77612
>Category:       ports
>Synopsis:       Unbreak audio/xsidplay on FreeBSD >= 5.x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 16 20:20:11 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Johan van Selst
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD mud.stack.nl 5.3-STABLE FreeBSD 5.3-STABLE #0: Mon Jan 31 22:31:14 CET 2005 root@mud.stack.nl:/usr/obj/usr/src/sys/mud i386


	
>Description:
	
	Compiler complains about streamoff arithmetic.
	Q&D fix: cast streamoff to off_t

>How-To-Repeat:
	
>Fix:

	

	Include this patch as files/patch-src_songlendb_File.cpp

--- src/songlendb/File.cpp.orig	Wed Feb 16 21:06:46 2005
+++ src/songlendb/File.cpp	Wed Feb 16 21:12:12 2005
@@ -126,9 +126,9 @@ bool SongLengthFile::init(const char* fi
     streampos fileLen = myIn.tellg();
 #endif
 #ifdef XSID_HAVE_NOTHROW
-    pDB = new(std::nothrow) char[fileLen+1L];
+    pDB = new(std::nothrow) char[(off_t)fileLen+1L];
 #else
-    pDB = new char[fileLen+1L];
+    pDB = new char[(off_t)fileLen+1L];
 #endif
     if ( pDB == 0 )
     {
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050216201844.A067D171DF>