Add elfutils-0.178-curl-code-gcc-10.patch
This commit is contained in:
parent
9558bcc5bf
commit
2162703997
53
elfutils-0.178-curl-code-gcc-10.patch
Normal file
53
elfutils-0.178-curl-code-gcc-10.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
commit 374fbed3da0197f794a904e78e75e961c7e2e92c
|
||||||
|
Author: Mark Wielaard <mark@klomp.org>
|
||||||
|
Date: Wed Dec 4 00:39:26 2019 +0100
|
||||||
|
|
||||||
|
debuginfod: Fix implicit conversion from 'CURLcode' to 'CURLMcode'
|
||||||
|
|
||||||
|
GCC10 warns when converting the value of one enum type into another:
|
||||||
|
|
||||||
|
debuginfod-client.c:530:24: error: implicit conversion from ‘CURLcode’
|
||||||
|
to ‘CURLMcode’ [-Werror=enum-conversion]
|
||||||
|
530 | curl_res = curl_easy_getinfo(target_handle,
|
||||||
|
| ^
|
||||||
|
|
||||||
|
libcurl has different error code enums. The "easy" interfaces return
|
||||||
|
a CURLcode error. The "multi" interface functions return a CURLMcode.
|
||||||
|
|
||||||
|
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
||||||
|
|
||||||
|
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
|
||||||
|
index 6e62b86c..302ea2dc 100644
|
||||||
|
--- a/debuginfod/debuginfod-client.c
|
||||||
|
+++ b/debuginfod/debuginfod-client.c
|
||||||
|
@@ -509,8 +509,6 @@ debuginfod_query_server (debuginfod_client *c,
|
||||||
|
long loops = 0;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
- CURLMcode curl_res;
|
||||||
|
-
|
||||||
|
if (c->progressfn) /* inform/check progress callback */
|
||||||
|
{
|
||||||
|
loops ++;
|
||||||
|
@@ -518,6 +516,7 @@ debuginfod_query_server (debuginfod_client *c,
|
||||||
|
long pb = 0;
|
||||||
|
if (target_handle) /* we've committed to a server; report its download progress */
|
||||||
|
{
|
||||||
|
+ CURLcode curl_res;
|
||||||
|
#ifdef CURLINFO_SIZE_DOWNLOAD_T
|
||||||
|
curl_off_t dl;
|
||||||
|
curl_res = curl_easy_getinfo(target_handle,
|
||||||
|
@@ -564,10 +563,10 @@ debuginfod_query_server (debuginfod_client *c,
|
||||||
|
if (data[i].handle != target_handle)
|
||||||
|
curl_multi_remove_handle(curlm, data[i].handle);
|
||||||
|
|
||||||
|
- curl_res = curl_multi_perform(curlm, &still_running);
|
||||||
|
- if (curl_res != CURLM_OK)
|
||||||
|
+ CURLMcode curlm_res = curl_multi_perform(curlm, &still_running);
|
||||||
|
+ if (curlm_res != CURLM_OK)
|
||||||
|
{
|
||||||
|
- switch (curl_res)
|
||||||
|
+ switch (curlm_res)
|
||||||
|
{
|
||||||
|
case CURLM_CALL_MULTI_PERFORM: continue;
|
||||||
|
case CURLM_OUT_OF_MEMORY: rc = -ENOMEM; break;
|
@ -56,6 +56,7 @@ BuildRequires: curl
|
|||||||
# Patches
|
# Patches
|
||||||
Patch1: elfutils-0.178-pt-gnu-prop.patch
|
Patch1: elfutils-0.178-pt-gnu-prop.patch
|
||||||
Patch2: elfutils-0.178-debuginfod-no-cache.patch
|
Patch2: elfutils-0.178-debuginfod-no-cache.patch
|
||||||
|
Patch3: elfutils-0.178-curl-code-gcc-10.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Elfutils is a collection of utilities, including stack (to show
|
Elfutils is a collection of utilities, including stack (to show
|
||||||
@ -249,6 +250,7 @@ such servers to download those files on demand.
|
|||||||
# Apply patches
|
# Apply patches
|
||||||
%patch1 -p1 -b .pt-gnu-prop
|
%patch1 -p1 -b .pt-gnu-prop
|
||||||
%patch2 -p1 -b .debuginfod-client-cache
|
%patch2 -p1 -b .debuginfod-client-cache
|
||||||
|
%patch3 -p1 -b .curl-gcc-10
|
||||||
|
|
||||||
# In case the above patches added any new test scripts, make sure they
|
# In case the above patches added any new test scripts, make sure they
|
||||||
# are executable.
|
# are executable.
|
||||||
@ -426,6 +428,9 @@ exit 0
|
|||||||
%systemd_postun_with_restart debuginfod.service
|
%systemd_postun_with_restart debuginfod.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 11 2019 Mark Wielaard <mjw@fedoraproject.org>
|
||||||
|
- Add elfutils-0.178-curl-code-gcc-10.patch
|
||||||
|
|
||||||
* Mon Dec 9 2019 Mark Wielaard <mjw@fedoraproject.org> - 0.178-5
|
* Mon Dec 9 2019 Mark Wielaard <mjw@fedoraproject.org> - 0.178-5
|
||||||
- Add elfutils-0.178-debuginfod-no-cache.patch.
|
- Add elfutils-0.178-debuginfod-no-cache.patch.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user