aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2017-02-01 20:28:30 +0800
committerjbeich <jbeich@FreeBSD.org>2017-02-01 20:28:30 +0800
commit1eb0fed846f2c7c502f46b01d129f0a1ebd90bac (patch)
treef351da242da5bc6f96ef0429767560ef7193b094
parent641e711abe6ad2a1f172e025cc17a514c2962e1b (diff)
downloadfreebsd-ports-gnome-1eb0fed846f2c7c502f46b01d129f0a1ebd90bac.tar.gz
freebsd-ports-gnome-1eb0fed846f2c7c502f46b01d129f0a1ebd90bac.tar.zst
freebsd-ports-gnome-1eb0fed846f2c7c502f46b01d129f0a1ebd90bac.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
-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;