Browse Source

cmCurl: Avoid using undocumented type for CURLOPT_NETRC values

Since upstream curl commit `2ec00372a1` (curl.h: change some enums to
defines with L suffix, 2025-02-25), the `CURL_NETRC_*` constants are
integer literals instead of `enum CURL_NETRC_OPTION`.  It turns out
that `curl_easy_setopt` has always expected a `long` anyway, and
that `CURL_NETRC_OPTION` is not documented for public use.

Fixes: #26754
pull/381/head
Brad King 5 months ago
parent
commit
1b0c92a3a1
  1. 2
      Source/cmCurl.cxx

2
Source/cmCurl.cxx

@ -170,7 +170,7 @@ std::string cmCurlSetNETRCOption(::CURL* curl, const std::string& netrc_level,
const std::string& netrc_file)
{
std::string e;
CURL_NETRC_OPTION curl_netrc_level = CURL_NETRC_LAST;
long curl_netrc_level = CURL_NETRC_LAST;
::CURLcode res;
if (!netrc_level.empty()) {

Loading…
Cancel
Save