mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 17:20:11 +01:00
CURLOPT_PROTOCOLS [0] was deprecated in libcurl 7.85.0 with
CURLOPT_PROTOCOLS_STR [1] as a replacement.
Well, technically it was only deprecated in 7.87.0, and retroactively
marked as deprecated since 7.85.0 [2]. But CURLOPT_PROTOCOLS_STR exists
since 7.85.0, so that's what we want to use.
This causes compiler warnings and build errors:
../src/core/nm-connectivity.c: In function 'do_curl_request':
../src/core/nm-connectivity.c:770:5: error: 'CURLOPT_PROTOCOLS' is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Werror=deprecated-declarations]
770 | curl_easy_setopt(ehandle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
| ^~~~~~~~~~~~~~~~
In file included from ../src/core/nm-connectivity.c:13:
/usr/include/curl/curl.h:1749:3: note: declared here
1749 | CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
| ^~~~~~~~~~~~~~~~~
This patch is largely taken from systemd patch [2].
Based-on-patch-by: Frantisek Sumsal <frantisek@sumsal.cz>
[0] https://curl.se/libcurl/c/CURLOPT_PROTOCOLS.html
[1] https://curl.se/libcurl/c/CURLOPT_PROTOCOLS_STR.html
[2]
|
||
|---|---|---|
| .. | ||
| tests | ||
| 90-nm-cloud-setup.sh | ||
| main.c | ||
| meson.build | ||
| nm-cloud-setup-utils.c | ||
| nm-cloud-setup-utils.h | ||
| nm-cloud-setup.service.in | ||
| nm-cloud-setup.timer | ||
| nm-http-client.c | ||
| nm-http-client.h | ||
| nmcs-provider-aliyun.c | ||
| nmcs-provider-aliyun.h | ||
| nmcs-provider-azure.c | ||
| nmcs-provider-azure.h | ||
| nmcs-provider-ec2.c | ||
| nmcs-provider-ec2.h | ||
| nmcs-provider-gcp.c | ||
| nmcs-provider-gcp.h | ||
| nmcs-provider.c | ||
| nmcs-provider.h | ||
| README.md | ||