diff --git a/wget-errno-clobber.patch b/wget-errno-clobber.patch new file mode 100644 index 0000000..be2477e --- /dev/null +++ b/wget-errno-clobber.patch @@ -0,0 +1,30 @@ +Index: wget-1.18/src/http.c +=================================================================== +--- wget-1.18.orig/src/http.c ++++ wget-1.18/src/http.c +@@ -1516,6 +1516,7 @@ persistent_available_p (const char *host + active, registered connection". */ + + #define CLOSE_FINISH(fd) do { \ ++ int errno_sav = errno; \ + if (!keep_alive) \ + { \ + if (pconn_active && (fd) == pconn.socket) \ +@@ -1524,14 +1525,17 @@ persistent_available_p (const char *host + fd_close (fd); \ + fd = -1; \ + } \ ++ errno = errno_sav; \ + } while (0) + + #define CLOSE_INVALIDATE(fd) do { \ ++ int errno_sav = errno; \ + if (pconn_active && (fd) == pconn.socket) \ + invalidate_persistent (); \ + else \ + fd_close (fd); \ + fd = -1; \ ++ errno = errno_sav; \ + } while (0) + + struct http_stat diff --git a/wget-libproxy.patch b/wget-libproxy.patch index bee5a0b..9ab6014 100644 --- a/wget-libproxy.patch +++ b/wget-libproxy.patch @@ -90,7 +90,7 @@ Index: wget-1.17/src/retr.c + } + for(i=0;proxies[i];i++) free(proxies[i]); + free(proxies); -+ free(pf); ++ px_proxy_factory_free(pf); + + if (!proxy || !*proxy) + return NULL; diff --git a/wget.changes b/wget.changes index 634287a..2e338a3 100644 --- a/wget.changes +++ b/wget.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Jul 28 15:37:37 UTC 2016 - josef.moellers@suse.com + +- Save/restore errno within CLOSE_FINISH and CLOSE_INVALIDATE. + (wget-errno-clobber.patch, boo#983660) + +------------------------------------------------------------------- +Fri Jul 22 12:34:02 UTC 2016 - dimstar@opensuse.org + +- Update wget-libproxy.patch: use libproxy's px_proxy_factory_free + instead of regular free in order to ensure the module destructors + are correctly running (boo#967601). + ------------------------------------------------------------------- Thu Jun 9 20:42:15 UTC 2016 - astieger@suse.com diff --git a/wget.spec b/wget.spec index 900807d..ed5235e 100644 --- a/wget.spec +++ b/wget.spec @@ -32,6 +32,7 @@ Patch1: wget-libproxy.patch Patch6: wget-1.14-no-ssl-comp.patch # PATCH-FIX-OPENSUSE fix pod syntax for perl 5.18 coolo@suse.de Patch7: wget-fix-pod-syntax.diff +Patch8: wget-errno-clobber.patch BuildRequires: automake BuildRequires: gpgme-devel >= 0.4.2 BuildRequires: libcares-devel @@ -77,6 +78,7 @@ This can be done in script files or via the command line. %endif %patch6 %patch7 -p1 +%patch8 -p1 %build %if 0%{?suse_version} > 1110