summaryrefslogtreecommitdiff
path: root/audio/zinf/files/patch-base_src_player.cpp
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2017-02-03 00:46:44 +0000
committerJan Beich <jbeich@FreeBSD.org>2017-02-03 00:46:44 +0000
commitfabeb6eea8b895335f427f3acbe0e3310c5c0c91 (patch)
tree5907ce0b16c53ec088332d363bbcab0582d8b8cb /audio/zinf/files/patch-base_src_player.cpp
parentUpdate to upstream bugfix revision #1. (diff)
audio/zinf: unbreak with libc++ 3.9
src/Http.cpp:771:11: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char* cp = strstr(buffer, "Content-Length:"); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/downloadmanager.cpp:401:15: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char* extension = strrchr(url, '.'); ^ ~~~~~~~~~~~~~~~~~ src/downloadmanager.cpp:561:11: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char* cp = strstr(buffer, "Content-Length:"); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/downloadmanager.cpp:575:11: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char* cp = strstr(buffer, "Last-Modified:"); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/downloadmanager.cpp:799:24: error: assigning to 'char *' from incompatible type 'const char *' file = strchr(item->SourceURL().c_str() + 7, '/'); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/player.cpp:552:21: error: assigning to 'char *' from incompatible type 'const char *' extension = strrchr(url.c_str(), '.'); ^~~~~~~~~~~~~~~~~~~~~~~~~ src/player.cpp:1109:17: error: assigning to 'char *' from incompatible type 'const char *' temp_proto = strstr(title, "://"); ^~~~~~~~~~~~~~~~~~~~ src/player.cpp:1129:15: error: assigning to 'char *' from incompatible type 'const char *' temp_ext = strrchr(title, '.'); ^~~~~~~~~~~~~~~~~~~ src/player.cpp:1964:14: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char *port = strchr(buffer.c_str(),':'); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ src/playlist.cpp:1964:15: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char* extension = strrchr(url, '.'); ^ ~~~~~~~~~~~~~~~~~ src/playlist.cpp:2045:15: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char* extension = strrchr(url, '.'); ^ ~~~~~~~~~~~~~~~~~ src/ThemeZip.cpp:150:15: error: assigning to 'char *' from incompatible type 'const char *' pPtr = strrchr(oFile.c_str(), DIR_MARKER); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/wavoutpmo.cpp:127:10: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char *pPtr = strrchr(GetUrl().c_str(), DIR_MARKER); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/ZinfTheme.cpp:1768:26: error: assigning to 'char *' from incompatible type 'const char *' pExtension = strrchr((*i).c_str(), '.'); ^~~~~~~~~~~~~~~~~~~~~~~~~~ pPtr = strrchr(m_oPath.c_str(), '/'); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ unix/src/cdpmo.cpp:116:10: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char *tracknumber = strrchr(url, '/'); ^ ~~~~~~~~~~~~~~~~~ unix/src/GTKPreferenceWindow.cpp:1755:20: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char *name = strrchr((*i).second.c_str(), '/'); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ unix/src/gtkmusicbrowser.cpp:1206:11: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char *ext = strrchr(m_currentListName.c_str(), '.'); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ misc.cpp:109:14: error: assigning to 'char *' from incompatible type 'const char *' cp = strrchr(url, '.'); ^~~~~~~~~~~~~~~~~ id3lib.cpp:366:11: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char *ptr = strrchr(url, '.'); ^ ~~~~~~~~~~~~~~~~~ id3lib.cpp:426:11: error: assigning to 'char *' from incompatible type 'const char *' ptr = strrchr(url, '.'); ^~~~~~~~~~~~~~~~~ id3lib.cpp:488:11: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char *ptr = strrchr(url.c_str(), '.'); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ vorbis.cpp:151:11: error: assigning to 'char *' from incompatible type 'const char *' ptr = strrchr(url, '.'); ^~~~~~~~~~~~~~~~~ Reported by: pkg-fallout
Notes
Notes: svn path=/head/; revision=433187
Diffstat (limited to 'audio/zinf/files/patch-base_src_player.cpp')
-rw-r--r--audio/zinf/files/patch-base_src_player.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/audio/zinf/files/patch-base_src_player.cpp b/audio/zinf/files/patch-base_src_player.cpp
new file mode 100644
index 000000000000..5a82a41bd214
--- /dev/null
+++ b/audio/zinf/files/patch-base_src_player.cpp
@@ -0,0 +1,51 @@
+--- base/src/player.cpp.orig 2004-02-02 17:39:35 UTC
++++ base/src/player.cpp
+@@ -547,7 +547,7 @@ void Player::HandleSingleArg(char *arg)
+ // who needs to get this, plm or dlm?
+ bool giveToDLM = false;
+ bool giveToTheme = false;
+- char* extension = NULL;
++ const char* extension = NULL;
+
+ extension = strrchr(url.c_str(), '.');
+
+@@ -1103,7 +1103,7 @@ char *
+ Player::
+ GetProtocol(const char *title)
+ {
+- char *temp_proto;
++ const char *temp_proto;
+ char *proto_return = NULL;
+
+ temp_proto = strstr(title, "://");
+@@ -1122,7 +1122,7 @@ char *
+ Player::
+ GetExtension(const char *title)
+ {
+- char *temp_ext;
++ const char *temp_ext;
+ char *ext_return = NULL;
+ char *proto = NULL;
+
+@@ -1961,15 +1961,14 @@ HandlePrefsChanged(Event *pEvent)
+ m_context->prefs->GetPrefString(kProxyHostPref, &buffer);
+ }
+
+- char *port = strchr(buffer.c_str(),':');
+- if (port) {
+- *port = '\0';
+- port++;
+- }
+ string proxyAddr = buffer;
+ int nPort = 80;
+- if (port && *port)
+- nPort = atoi(port);
++ size_t pos = buffer.find(':');
++ if (pos != string::npos) {
++ proxyAddr = buffer.substr(0, pos++);
++ if (pos < buffer.size())
++ nPort = stoi(buffer.substr(pos));
++ }
+ }
+
+