summaryrefslogtreecommitdiff
path: root/audio/xsidplay/patches/patch-ab
blob: 6cb81dc3b9410cf3d36ece3956d80f195602ac68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$NetBSD: patch-ab,v 1.9 2011/11/23 22:32:59 marino Exp $

--- src/songlendb/File.cpp.orig	2002-03-03 18:00:03.000000000 +0000
+++ src/songlendb/File.cpp
@@ -27,6 +27,9 @@
 #ifdef XSID_HAVE_NOTHROW
 #include <new>
 #endif
+#if defined (__DragonFly__)
+#include <string.h>
+#endif
 using namespace std;
 
 #include "File.h"
@@ -126,7 +129,7 @@ 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[(size_t)fileLen+1L];
 #else
     pDB = new char[fileLen+1L];
 #endif