Package: libmusicbrainz-2.1
Severity: normal
Version: 2.1.1-3
Tags: patch

>From my build log:

...
if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. 
-I../include/musicbrainz    -g -Wall -O2 -Wall -MT comhttpsocket.lo -MD -MP -MF 
".deps/comhttpsocket.Tpo" -c -o comhttpsocket.lo comhttpsocket.cpp; \
then mv -f ".deps/comhttpsocket.Tpo" ".deps/comhttpsocket.Plo"; else rm -f 
".deps/comhttpsocket.Tpo"; exit 1; fi
 g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include/musicbrainz -g -Wall -O2 -Wall 
-MT comhttpsocket.lo -MD -MP -MF .deps/comhttpsocket.Tpo -c comhttpsocket.cpp  
-fPIC -DPIC -o .libs/comhttpsocket.o
comhttpsocket.cpp: In member function 'int MBCOMHTTPSocket::NBRead(char*, int, 
int*, int)':
comhttpsocket.cpp:197: error: cast from 'char*' to 'int' loses precision
comhttpsocket.cpp:197: error: cast from 'char*' to 'int' loses precision
make[3]: *** [comhttpsocket.lo] Error 1
make[3]: Leaving directory `/tmp/buildd/libmusicbrainz-2.1-2.1.1/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/buildd/libmusicbrainz-2.1-2.1.1'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/buildd/libmusicbrainz-2.1-2.1.1'
make: *** [debian/stamp-makefile-build] Error 2

I've attached a patch which makes the package build under g++-4.0.

-- System Information:
Debian Release: testing/unstable
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11-9-amd64-k8
Locale: LANG=en, LC_CTYPE=en (charmap=UTF-8) (ignored: LC_ALL set to 
en_US.UTF-8)

-- 
Daniel Schepler              "Please don't disillusion me.  I
[EMAIL PROTECTED]    haven't had breakfast yet."
                                 -- Orson Scott Card
diff -urN libmusicbrainz-2.1-2.1.1.old/lib/comhttpsocket.cpp libmusicbrainz-2.1-2.1.1/lib/comhttpsocket.cpp
--- libmusicbrainz-2.1-2.1.1.old/lib/comhttpsocket.cpp	2004-03-16 00:34:22.000000000 +0000
+++ libmusicbrainz-2.1-2.1.1/lib/comhttpsocket.cpp	2005-07-02 03:26:56.000000000 +0000
@@ -194,7 +194,7 @@
 	// advance to the data now, if there is any in this first buffer. 
 	char* pData = strstr(HeaderBuffer, "\r\n\r\n");
 	if (pData) pData += 4;
-	int nOffset = (int)pData - (int)HeaderBuffer;
+	int nOffset = (long)pData - (long)HeaderBuffer;
 	if (nTotal - nOffset >= nLen) // case 1: entire requested read is in header chunk
 	{
 		memcpy(pBuffer, pData, nLen);

Reply via email to