From 24fdb03628499e1cff3e6a585b0fe075c318f418 Mon Sep 17 00:00:00 2001 From: dillon_chen Date: Fri, 24 Jun 2022 10:40:45 +0800 Subject: [PATCH] add patch3 --- ...ing-return-value-of-the-evdns_base_r.patch | 43 +++++++++++++++++++ libevent.spec | 11 ++++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 0001-Revert-Fix-checking-return-value-of-the-evdns_base_r.patch diff --git a/0001-Revert-Fix-checking-return-value-of-the-evdns_base_r.patch b/0001-Revert-Fix-checking-return-value-of-the-evdns_base_r.patch new file mode 100644 index 0000000..a9517fc --- /dev/null +++ b/0001-Revert-Fix-checking-return-value-of-the-evdns_base_r.patch @@ -0,0 +1,43 @@ +From 7905dba8cf136574b87c972cf1f91a8f95b9df8c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= +Date: Tue, 29 Sep 2020 17:37:18 +0200 +Subject: [PATCH] Revert "Fix checking return value of the + evdns_base_resolv_conf_parse()" + +This reverts commit fc51bf2c5b686f623c9a2906ddad4042d5c3b39a. +--- + evdns.c | 2 +- + sample/dns-example.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/evdns.c b/evdns.c +index a5b31a3c..4aef28ec 100644 +--- a/evdns.c ++++ b/evdns.c +@@ -4035,7 +4035,7 @@ evdns_base_new(struct event_base *event_base, int flags) + #else + r = evdns_base_resolv_conf_parse(base, opts, "/etc/resolv.conf"); + #endif +- if (r) { ++ if (r == -1) { + evdns_base_free_and_unlock(base, 0); + return NULL; + } +diff --git a/sample/dns-example.c b/sample/dns-example.c +index 2d07c387..21a75de8 100644 +--- a/sample/dns-example.c ++++ b/sample/dns-example.c +@@ -225,8 +225,8 @@ main(int c, char **v) { + res = evdns_base_resolv_conf_parse(evdns_base, + DNS_OPTION_NAMESERVERS, o.resolv_conf); + +- if (res) { +- fprintf(stderr, "Couldn't configure nameservers\n"); ++ if (res < 0) { ++ fprintf(stderr, "Couldn't configure nameservers"); + return 1; + } + } +-- +2.25.4 + diff --git a/libevent.spec b/libevent.spec index 37aaa7f..62f60cb 100644 --- a/libevent.spec +++ b/libevent.spec @@ -1,6 +1,6 @@ Name: libevent Version: 2.1.12 -Release: 5 +Release: 6 Summary: An event notification library License: BSD @@ -13,6 +13,12 @@ Patch0: libevent-nonettests.patch Patch1: http-add-callback-to-allow-server-to-decline-and-the.patch Patch2: add-testcases-for-event.c-apis.patch +# Temporary downstream change: revert a problematic upstream change +# until Transmission is fixed. Please drop the patch when the Transmission +# issue is fixed. +# https://github.com/transmission/transmission/issues/1437 +Patch3: 0001-Revert-Fix-checking-return-value-of-the-evdns_base_r.patch + %description Libevent additionally provides a sophisticated framework for buffered network IO, with support for sockets, filters, rate-limiting, SSL, zero-copy file transmission, and IOCP. @@ -69,6 +75,9 @@ rm -f %{buildroot}%{_libdir}/*.la %changelog +* Fri Jun 24 2022 dillon chen - 2.1.12-6 +- add patch3 + * Tue Nov 23 2021 Hu Bin - 2.1.12-5 - Type:enhancement - ID:NA -- Gitee