summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2012-05-23 04:28:29 +0000
committerdholland <dholland@pkgsrc.org>2012-05-23 04:28:29 +0000
commit42c7e94aaca14bd3dc1ba6a6ca7045d75c40b457 (patch)
tree6ffd80b8ff28384a62d8b3ff6c7aff6e5522ffa1 /audio
parent2ddb38e0f51a1595affdc2565931b2811a55b311 (diff)
downloadpkgsrc-42c7e94aaca14bd3dc1ba6a6ca7045d75c40b457.tar.gz
Don't launder const. Should fix Linux build.
Diffstat (limited to 'audio')
-rw-r--r--audio/sidplay2/distinfo3
-rw-r--r--audio/sidplay2/patches/patch-src_args_cpp23
2 files changed, 25 insertions, 1 deletions
diff --git a/audio/sidplay2/distinfo b/audio/sidplay2/distinfo
index 52f79c7b9a5..3a4e80f1f0c 100644
--- a/audio/sidplay2/distinfo
+++ b/audio/sidplay2/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.3 2011/11/27 19:33:55 joerg Exp $
+$NetBSD: distinfo,v 1.4 2012/05/23 04:28:29 dholland 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_audio_wav_WavFile.cpp) = a7ef72b68eb3a86bf01537e9da4fba7d44dd280e
diff --git a/audio/sidplay2/patches/patch-src_args_cpp b/audio/sidplay2/patches/patch-src_args_cpp
new file mode 100644
index 00000000000..8d6a6f41e5e
--- /dev/null
+++ b/audio/sidplay2/patches/patch-src_args_cpp
@@ -0,0 +1,23 @@
+$NetBSD: patch-src_args_cpp,v 1.1 2012/05/23 04:28:29 dholland Exp $]
+
+Don't launder const. Fixes build with recent glibc.
+
+--- src/args.cpp~ 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;