$OpenBSD: patch-db_cc,v 1.2 2012/05/08 12:48:14 landry Exp $
--- db.cc.orig	Sun Mar  5 14:39:37 2006
+++ db.cc	Wed May  2 16:25:48 2012
@@ -42,7 +42,7 @@
 #include <id3tag.h>
 
 #ifdef MPEG4_ENABLE
-	#include <mp4.h>
+	#include <mp4v2/mp4v2.h>
 #endif
 
 
@@ -325,7 +325,7 @@ void Database::addM4a( std::string& path, struct stat 
 			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);
