| @@ -1,13 +1,23 @@ | | | @@ -1,13 +1,23 @@ |
1 | $NetBSD: patch-ab,v 1.8 2005/12/07 18:59:26 joerg Exp $ | | 1 | $NetBSD: patch-ab,v 1.9 2011/11/23 22:32:59 marino Exp $ |
2 | | | 2 | |
3 | --- src/songlendb/File.cpp.orig 2005-12-07 16:56:52.000000000 +0000 | | 3 | --- src/songlendb/File.cpp.orig 2002-03-03 18:00:03.000000000 +0000 |
4 | +++ src/songlendb/File.cpp | | 4 | +++ src/songlendb/File.cpp |
5 | @@ -126,7 +126,7 @@ bool SongLengthFile::init(const char* fi | | 5 | @@ -27,6 +27,9 @@ |
| | | 6 | #ifdef XSID_HAVE_NOTHROW |
| | | 7 | #include <new> |
| | | 8 | #endif |
| | | 9 | +#if defined (__DragonFly__) |
| | | 10 | +#include <string.h> |
| | | 11 | +#endif |
| | | 12 | using namespace std; |
| | | 13 | |
| | | 14 | #include "File.h" |
| | | 15 | @@ -126,7 +129,7 @@ bool SongLengthFile::init(const char* fi |
6 | streampos fileLen = myIn.tellg(); | | 16 | streampos fileLen = myIn.tellg(); |
7 | #endif | | 17 | #endif |
8 | #ifdef XSID_HAVE_NOTHROW | | 18 | #ifdef XSID_HAVE_NOTHROW |
9 | - pDB = new(std::nothrow) char[fileLen+1L]; | | 19 | - pDB = new(std::nothrow) char[fileLen+1L]; |
10 | + pDB = new(std::nothrow) char[(size_t)fileLen+1L]; | | 20 | + pDB = new(std::nothrow) char[(size_t)fileLen+1L]; |
11 | #else | | 21 | #else |
12 | pDB = new char[fileLen+1L]; | | 22 | pDB = new char[fileLen+1L]; |
13 | #endif | | 23 | #endif |