diff --git a/libproxy-gcc45.patch b/libproxy-gcc45.patch new file mode 100644 index 0000000..9972b01 --- /dev/null +++ b/libproxy-gcc45.patch @@ -0,0 +1,68 @@ +Index: libproxy/url.cpp +=================================================================== +--- libproxy/url.cpp.orig ++++ libproxy/url.cpp +@@ -95,11 +95,11 @@ url::url(const string url) throw(parse_e + // Break apart our url into 4 sections: scheme, auth (user/pass), host and path + // We'll do further parsing of auth and host a bit later + // NOTE: reset the unused variable after each scan or we get bleed-through +- if (sscanf(url.c_str(), "%[^:]://%[^@]@%[^/]/%s", schm, auth, host, path) != 4 && !((*path = NULL)) && // URL with auth, host and path +- sscanf(url.c_str(), "%[^:]://%[^@]@%[^/]", schm, auth, host) != 3 && !((*auth = NULL)) && // URL with auth, host +- sscanf(url.c_str(), "%[^:]://%[^/]/%s", schm, host, path) != 3 && !((*path = NULL)) && // URL with host, path +- sscanf(url.c_str(), "%[^:]://%[^/]", schm, host) != 2 && !((*host = NULL)) && // URL with host +- !(sscanf(url.c_str(), "%[^:]://%s", schm, path) == 2 && string("file") == schm) && !((*path = NULL)) && // URL with path (ex: file:///foo) ++ if (sscanf(url.c_str(), "%[^:]://%[^@]@%[^/]/%s", schm, auth, host, path) != 4 && !((*path = '\0')) && // URL with auth, host and path ++ sscanf(url.c_str(), "%[^:]://%[^@]@%[^/]", schm, auth, host) != 3 && !((*auth = '\0')) && // URL with auth, host ++ sscanf(url.c_str(), "%[^:]://%[^/]/%s", schm, host, path) != 3 && !((*path = '\0')) && // URL with host, path ++ sscanf(url.c_str(), "%[^:]://%[^/]", schm, host) != 2 && !((*host = '\0')) && // URL with host ++ !(sscanf(url.c_str(), "%[^:]://%s", schm, path) == 2 && string("file") == schm) && !((*path = '\0')) && // URL with path (ex: file:///foo) + !(sscanf(url.c_str(), "%[^:]://", schm) == 1 && (string("direct") == schm || string("wpad") == schm))) // URL with scheme-only (ex: wpad://, direct://) + { + delete schm; +@@ -112,8 +112,8 @@ url::url(const string url) throw(parse_e + // Set scheme and path + this->scheme = schm; + this->path = *path ? string("/") + path : ""; +- *schm = NULL; +- *path = NULL; ++ *schm = '\0'; ++ *path = '\0'; + + // Parse auth further + if (*auth) { +@@ -122,7 +122,7 @@ url::url(const string url) throw(parse_e + this->pass = this->user.substr(this->user.find(":")+1); + this->user = this->user.substr(0, this->user.find(":")); + } +- *auth = NULL; ++ *auth = '\0'; + } + + // Parse host further. Basically, we're looking for a port. +@@ -142,7 +142,7 @@ url::url(const string url) throw(parse_e + } + + this->host = host; +- *host = NULL; ++ *host = '\0'; + } + + // Cleanup +@@ -235,7 +235,7 @@ sockaddr const* const* url::get_ips(bool + // Check DNS for IPs + struct addrinfo* info; + struct addrinfo flags; +- memset(&flags, NULL, sizeof(addrinfo)); ++ memset(&flags, '\0', sizeof(addrinfo)); + flags.ai_family = AF_UNSPEC; + flags.ai_socktype = 0; + flags.ai_protocol = 0; +@@ -254,7 +254,7 @@ sockaddr const* const* url::get_ips(bool + + // Create our array since we actually have a result + this->ips = new sockaddr*[++i]; +- memset(this->ips, NULL, sizeof(sockaddr*)*i); ++ memset(this->ips, '\0', sizeof(sockaddr*)*i); + + // Copy the sockaddr's into this->ips + for (i = 0, info = first ; info ; info = info->ai_next) { diff --git a/libproxy-plugins.changes b/libproxy-plugins.changes index ac2ac8f..4285982 100644 --- a/libproxy-plugins.changes +++ b/libproxy-plugins.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Mar 6 18:32:06 UTC 2010 - dimstar@opensuse.org + +- Add libproxy-gcc45.patch to fix build with gcc 4.5. Patch comes + from upstream svn, rev 599. + ------------------------------------------------------------------- Fri Feb 26 09:44:18 CET 2010 - dimstar@opensuse.org diff --git a/libproxy-plugins.spec b/libproxy-plugins.spec index a3f6f2a..b64bc2f 100644 --- a/libproxy-plugins.spec +++ b/libproxy-plugins.spec @@ -1,5 +1,5 @@ # -# spec file for package libproxy-plugins (Version 0.4.0) +# spec file for package libproxy (Version 0.4.0) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -43,6 +43,8 @@ Patch0: libproxy-pysitelib.patch Patch1: libproxy-libexecpath.patch # PATCH-FIX-UPSTREAM libproxy-pkgconfig.patch dimstar@opensuse.org -- Install pkgconfig files, taken from upstream svn. Patch2: libproxy-pkgconfig.patch +# PATCH-FIX-UPSTREAM libproxy-gcc45.patch dimstar@opensuse.org -- Fix build with gcc 4.5, taken from upstream svn. +Patch3: libproxy-gcc45.patch License: LGPLv2.1+ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake @@ -269,6 +271,7 @@ about network configuration changes. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p0 %build cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \ diff --git a/libproxy.changes b/libproxy.changes index ac2ac8f..4285982 100644 --- a/libproxy.changes +++ b/libproxy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Mar 6 18:32:06 UTC 2010 - dimstar@opensuse.org + +- Add libproxy-gcc45.patch to fix build with gcc 4.5. Patch comes + from upstream svn, rev 599. + ------------------------------------------------------------------- Fri Feb 26 09:44:18 CET 2010 - dimstar@opensuse.org diff --git a/libproxy.spec b/libproxy.spec index e6a68c3..d42453c 100644 --- a/libproxy.spec +++ b/libproxy.spec @@ -43,6 +43,8 @@ Patch0: libproxy-pysitelib.patch Patch1: libproxy-libexecpath.patch # PATCH-FIX-UPSTREAM libproxy-pkgconfig.patch dimstar@opensuse.org -- Install pkgconfig files, taken from upstream svn. Patch2: libproxy-pkgconfig.patch +# PATCH-FIX-UPSTREAM libproxy-gcc45.patch dimstar@opensuse.org -- Fix build with gcc 4.5, taken from upstream svn. +Patch3: libproxy-gcc45.patch License: LGPLv2.1+ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake @@ -269,6 +271,7 @@ about network configuration changes. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p0 %build cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \