diff --git a/libproxy-gcc47.patch b/libproxy-gcc47.patch new file mode 100644 index 0000000..0bbc8b8 --- /dev/null +++ b/libproxy-gcc47.patch @@ -0,0 +1,71 @@ +Index: libproxy-0.4.7/libproxy/modules/config_sysconfig.cpp +=================================================================== +--- libproxy-0.4.7.orig/libproxy/modules/config_sysconfig.cpp ++++ libproxy-0.4.7/libproxy/modules/config_sysconfig.cpp +@@ -21,6 +21,9 @@ + #include + #include + #include ++#include ++#include ++ + + #include "../extension_config.hpp" + using namespace libproxy; +Index: libproxy-0.4.7/libproxy/modules/pacrunner_mozjs.cpp +=================================================================== +--- libproxy-0.4.7.orig/libproxy/modules/pacrunner_mozjs.cpp ++++ libproxy-0.4.7/libproxy/modules/pacrunner_mozjs.cpp +@@ -18,6 +18,7 @@ + ******************************************************************************/ + + #include // ? ++#include // gethostname + + #include "../extension_pacrunner.hpp" + using namespace libproxy; +@@ -85,7 +86,7 @@ static JSBool myIpAddress(JSContext *cx, + if (!gethostname(hostname, 1023)) { + JSString *myhost = JS_NewStringCopyN(cx, hostname, strlen(hostname)); + jsval arg = STRING_TO_JSVAL(myhost); +- return dnsResolve_(cx, 1, &arg); ++ return dnsResolve_(cx, arg, vp); + } + JS_free(cx, hostname); + JS_SET_RVAL(cx, vp, JSVAL_NULL); +Index: libproxy-0.4.7/libproxy/modules/pacrunner_natus.cpp +=================================================================== +--- libproxy-0.4.7.orig/libproxy/modules/pacrunner_natus.cpp ++++ libproxy-0.4.7/libproxy/modules/pacrunner_natus.cpp +@@ -18,6 +18,7 @@ + ******************************************************************************/ + + #include "../extension_pacrunner.hpp" ++#include // gethostname + using namespace libproxy; + + #define I_ACKNOWLEDGE_THAT_NATUS_IS_NOT_STABLE +Index: libproxy-0.4.7/libproxy/modules/pacrunner_webkit.cpp +=================================================================== +--- libproxy-0.4.7.orig/libproxy/modules/pacrunner_webkit.cpp ++++ libproxy-0.4.7/libproxy/modules/pacrunner_webkit.cpp +@@ -18,6 +18,7 @@ + ******************************************************************************/ + + #include "../extension_pacrunner.hpp" ++#include // gethostname + using namespace libproxy; + + #ifdef __APPLE__ +Index: libproxy-0.4.7/libproxy/url.cpp +=================================================================== +--- libproxy-0.4.7.orig/libproxy/url.cpp ++++ libproxy-0.4.7/libproxy/url.cpp +@@ -33,6 +33,7 @@ + #include // For atoi() + #include // For stat() + #include // For transform() ++#include // For read() close() + + #ifdef WIN32 + #include diff --git a/libproxy-plugins.changes b/libproxy-plugins.changes index 307d831..625a2b8 100644 --- a/libproxy-plugins.changes +++ b/libproxy-plugins.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Mar 13 21:19:29 UTC 2012 - dimstar@opensuse.org + +- Add libproxy-gcc47.patch: Fix build with gcc 4.7. + ------------------------------------------------------------------- Wed Feb 1 20:08:01 UTC 2012 - dimstar@opensuse.org diff --git a/libproxy-plugins.spec b/libproxy-plugins.spec index be6d938..9791cb1 100644 --- a/libproxy-plugins.spec +++ b/libproxy-plugins.spec @@ -51,6 +51,8 @@ Patch0: libproxy-javascriptcoregtk.patch Patch1: libproxy-mozjs185.patch # PATCH-FIX-UPSTREAM libproxy-trim-ignores.patch bnc#739069 dimstar@opensuse.org -- Trim strings in ignore list; taken from upstream svn, r821. Patch2: libproxy-trim-ignores.patch +# PATCH-FIX-UPSTREAM libproxy-gcc47.patch dimstar@opensuse.org -- Fix build with gcc 4.7. Taken from upstream svn, r833. +Patch3: libproxy-gcc47.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake BuildRequires: gcc-c++ @@ -73,10 +75,10 @@ BuildRequires: pkgconfig(gio-2.0) >= 2.26 BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(webkitgtk-3.0) %endif -BuildRequires: pkgconfig(mozjs185) BuildRequires: NetworkManager-devel BuildRequires: libkde4-devel BuildRequires: libqt4-devel +BuildRequires: pkgconfig(mozjs185) %endif %else %if 0%{?have_mono} @@ -309,6 +311,7 @@ about network configuration changes. %patch0 -p0 %patch1 -p1 %patch2 -p0 +%patch3 -p1 mkdir build %build diff --git a/libproxy.changes b/libproxy.changes index 307d831..625a2b8 100644 --- a/libproxy.changes +++ b/libproxy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Mar 13 21:19:29 UTC 2012 - dimstar@opensuse.org + +- Add libproxy-gcc47.patch: Fix build with gcc 4.7. + ------------------------------------------------------------------- Wed Feb 1 20:08:01 UTC 2012 - dimstar@opensuse.org diff --git a/libproxy.spec b/libproxy.spec index 79d8809..cef0a63 100644 --- a/libproxy.spec +++ b/libproxy.spec @@ -51,6 +51,8 @@ Patch0: libproxy-javascriptcoregtk.patch Patch1: libproxy-mozjs185.patch # PATCH-FIX-UPSTREAM libproxy-trim-ignores.patch bnc#739069 dimstar@opensuse.org -- Trim strings in ignore list; taken from upstream svn, r821. Patch2: libproxy-trim-ignores.patch +# PATCH-FIX-UPSTREAM libproxy-gcc47.patch dimstar@opensuse.org -- Fix build with gcc 4.7. Taken from upstream svn, r833. +Patch3: libproxy-gcc47.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake BuildRequires: gcc-c++ @@ -73,10 +75,10 @@ BuildRequires: pkgconfig(gio-2.0) >= 2.26 BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(webkitgtk-3.0) %endif -BuildRequires: pkgconfig(mozjs185) BuildRequires: NetworkManager-devel BuildRequires: libkde4-devel BuildRequires: libqt4-devel +BuildRequires: pkgconfig(mozjs185) %endif %else %if 0%{?have_mono} @@ -309,6 +311,7 @@ about network configuration changes. %patch0 -p0 %patch1 -p1 %patch2 -p0 +%patch3 -p1 mkdir build %build