diff options
-rw-r--r-- | audio/sidplay2/distinfo | 4 | ||||
-rw-r--r-- | audio/sidplay2/patches/patch-src_args_cpp | 32 |
2 files changed, 14 insertions, 22 deletions
diff --git a/audio/sidplay2/distinfo b/audio/sidplay2/distinfo index 3a4e80f1f0c..3ee9e399425 100644 --- a/audio/sidplay2/distinfo +++ b/audio/sidplay2/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.4 2012/05/23 04:28:29 dholland Exp $ +$NetBSD: distinfo,v 1.5 2012/07/01 09:24:44 sbd Exp $ SHA1 (sidplay-2.0.9.tar.gz) = 2e4589cc59b3d2d37f38b98d7a0a0ba37b82da7a RMD160 (sidplay-2.0.9.tar.gz) = 9d7d2cbcb472ab413093e85827de2c7099782e47 Size (sidplay-2.0.9.tar.gz) = 362140 bytes SHA1 (patch-aa) = 12e236e42f2cbf311e5d9ed7b25c262089f57a27 -SHA1 (patch-src_args_cpp) = 85898b44fd5ece2a327b76a6ad29032ead088a47 +SHA1 (patch-src_args_cpp) = e80aaff4884c7ce159f15e5fed6a56099d281f2a SHA1 (patch-src_audio_wav_WavFile.cpp) = a7ef72b68eb3a86bf01537e9da4fba7d44dd280e diff --git a/audio/sidplay2/patches/patch-src_args_cpp b/audio/sidplay2/patches/patch-src_args_cpp index 8d6a6f41e5e..5dd04e27d55 100644 --- a/audio/sidplay2/patches/patch-src_args_cpp +++ b/audio/sidplay2/patches/patch-src_args_cpp @@ -1,23 +1,15 @@ -$NetBSD: patch-src_args_cpp,v 1.1 2012/05/23 04:28:29 dholland Exp $] +$NetBSD: patch-src_args_cpp,v 1.2 2012/07/01 09:24:45 sbd Exp $] -Don't launder const. Fixes build with recent glibc. +Cast away the const in a strstr call. ---- src/args.cpp~ 2004-05-05 23:49:20.000000000 +0000 +--- src/args.cpp.orig 2004-05-05 23:49:20.000000000 +0000 +++ src/args.cpp -@@ -110,8 +110,14 @@ bool ConsolePlayer::parseTime (const cha - else - { // Read in MM:SS format - int val; -- *sep = '\0'; -- val = atoi (str); -+ char *tmp; -+ size_t len; -+ len = sep - str; -+ tmp = new char[len + 1]; -+ memcpy(tmp, str, len); -+ tmp[len] = 0; -+ val = atoi (tmp); -+ delete []tmp; - if (val < 0 || val > 99) - return false; - _time = (uint_least32_t) val * 60; +@@ -102,7 +102,7 @@ bool ConsolePlayer::parseTime (const cha + if (*str == '\0') + return false; + +- sep = strstr (str, ":"); ++ sep = (char*) strstr (str, ":"); + if (!sep) + { // User gave seconds + _time = atoi (str); |