$NetBSD: patch-af,v 1.2 2020/03/26 21:51:24 joerg Exp $

--- db.cc.orig	2006-03-05 13:39:37.000000000 +0000
+++ db.cc
@@ -180,14 +180,14 @@ void Database::addMp3( std::string& path
 	
 		if( getId3TextFrame( tag, "TRCK", s ) == 0 ) {
 			song->tracknumber = strtol( s.c_str(), NULL, 10 );
-			char *sp;
+			const char *sp;
 			if( ( sp = strchr( s.c_str(), '/' ) ) != 0 ) 
 				song->trackcount = strtol( sp+1, NULL, 10 );
 		}
 					
 		if( getId3TextFrame( tag, "TPOS", s ) == 0 ) {
 			song->discnumber = strtol( s.c_str(), NULL, 10 );
-			char *sp;
+			const char *sp;
 			if( ( sp = strchr( s.c_str(), '/' ) ) != 0 ) 
 				song->disccount = strtol( sp+1, NULL, 10 );
 		}
@@ -325,7 +325,7 @@ void Database::addM4a( std::string& path
 			MP4TrackId trackId = MP4FindTrackId(mp4file, 0);
 			u32 timeScale = MP4GetTrackTimeScale(mp4file, trackId);
 			MP4Duration trackDuration = MP4GetTrackDuration(mp4file, trackId);
-			double msDuration = UINT64_TO_DOUBLE(MP4ConvertFromTrackDuration(mp4file, trackId, trackDuration, MP4_MSECS_TIME_SCALE));
+			double msDuration = (double)MP4ConvertFromTrackDuration(mp4file, trackId, trackDuration, MP4_MSECS_TIME_SCALE);
 			u32 avgBitRate = MP4GetTrackBitRate(mp4file, trackId);
 			song->time = (u32) (msDuration);
 			song->bitrate = (u16) ((avgBitRate + 500) / 1000);
@@ -413,7 +413,7 @@ int Database::getTypeFromExtension( std:
 	// we just trust the user that files with extension
 	// .mp3 are really mp3 files etc.
 	// metadata in the filesystem would be cool :(
-	char *pointPos;
+	const char *pointPos;
 	if( ( pointPos = strrchr( fileName.c_str(), '.' ) ) != 0 ) {
 		if( strlen( pointPos ) >= 5 ) {
 			if( strncasecmp( pointPos, ".aiff", 5 ) == 0 ) {
