aboutsummaryrefslogtreecommitdiff
path: root/audio/sidplay2
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2017-02-01 12:28:30 +0000
committerJan Beich <jbeich@FreeBSD.org>2017-02-01 12:28:30 +0000
commit4234e8e8650be3cf735f5f7b3e072a55b97fcfa9 (patch)
treef351da242da5bc6f96ef0429767560ef7193b094 /audio/sidplay2
parent48c5cf152e1a01fa274571a5ae91acd4c7e467e4 (diff)
downloadports-4234e8e8650be3cf735f5f7b3e072a55b97fcfa9.tar.gz
ports-4234e8e8650be3cf735f5f7b3e072a55b97fcfa9.zip
audio/sidplay2: unbreak with libc++ 3.9
args.cpp:105:9: error: assigning to 'char *' from incompatible type 'const char *' sep = strstr (str, ":"); ^ ~~~~~~~~~~~~~~~~~ Reported by: pkg-fallout
Notes
Notes: svn path=/head/; revision=433015
Diffstat (limited to 'audio/sidplay2')
-rw-r--r--audio/sidplay2/Makefile2
-rw-r--r--audio/sidplay2/files/patch-src_args.cpp22
2 files changed, 23 insertions, 1 deletions
diff --git a/audio/sidplay2/Makefile b/audio/sidplay2/Makefile
index 67fc0ad22601..a3151aefd60e 100644
--- a/audio/sidplay2/Makefile
+++ b/audio/sidplay2/Makefile
@@ -3,7 +3,7 @@
PORTNAME= sidplay2
PORTVERSION= 2.0.9
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= audio emulators
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/sidplay-${PORTVERSION}
DISTNAME= sidplay-${PORTVERSION}
diff --git a/audio/sidplay2/files/patch-src_args.cpp b/audio/sidplay2/files/patch-src_args.cpp
new file mode 100644
index 000000000000..99213f69711a
--- /dev/null
+++ b/audio/sidplay2/files/patch-src_args.cpp
@@ -0,0 +1,22 @@
+--- src/args.cpp.orig 2004-05-05 23:49:20 UTC
++++ src/args.cpp
+@@ -95,7 +95,7 @@ using std::endl;
+ // Convert time from integer
+ bool ConsolePlayer::parseTime (const char *str, uint_least32_t &time)
+ {
+- char *sep;
++ const char *sep;
+ uint_least32_t _time;
+
+ // Check for empty string
+@@ -110,8 +110,9 @@ bool ConsolePlayer::parseTime (const cha
+ else
+ { // Read in MM:SS format
+ int val;
+- *sep = '\0';
++ char *tmp = strndup(str, sep - str);
+ val = atoi (str);
++ free(tmp);
+ if (val < 0 || val > 99)
+ return false;
+ _time = (uint_least32_t) val * 60;