]> git.ipfire.org Git - thirdparty/elfutils.git/commit
PR29926: debuginfod: Fix usage of deprecated CURLINFO_*
authorAndrew Paprocki <andrew@ishiboo.com>
Wed, 21 Dec 2022 16:15:00 +0000 (11:15 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Wed, 21 Dec 2022 16:39:25 +0000 (11:39 -0500)
commitd2bf497b12fbd49b4996ccf0744303ffd67735b1
tree50e0d8d15f2e8e75c6080965c1fbdec0d5573d80
parent6ecd16410ce1fe5cb0ac5b7c3342c5cc330e3a04
PR29926: debuginfod: Fix usage of deprecated CURLINFO_*

The `CURLINFO_SIZE_DOWNLOAD_T` and `CURLINFO_CONTENT_LENGTH_DOWNLOAD_T`
identifiers are `enum`s, not pre-processor definitions, so the current
`#ifdef` logic is not selecting the newer API.  This results in the
older identifiers being used and they now generate errors when compiled
against Curl 7.87, which has silently deprecated them, causing GCC to
emit `-Werror=deprecated-declarations`.

Instead, the newer identifiers were added in Curl 7.55, so explicitly
check for `CURL_AT_LEAST_VERSION(7, 55, 0)` instead of the current
logic.  This eliminates the error when compiling against Curl 7.87.

Ref: https://github.com/curl/curl/pull/1511

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
debuginfod/ChangeLog
debuginfod/debuginfod-client.c