1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Description: fix invocation of curl_easy_getinfo()
curl_easy_getinfo() expects a pointer to a long while the upstream code
provides a pointer to an int. This patch first provides a pointer to a interim
variable of type long, then converts the result to int and finally stores it
in the structure intended by upstream.
Without this patch autopkgtest fails on big-endian architectures.
Author: Sven Geuer <sge@debian.org
Forwarded: not-needed
Last-Update: 2025-04-14
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/get_url.c
+++ b/src/get_url.c
@@ -101,7 +101,9 @@
estructura.estado=curl_easy_perform(curl);
- curl_easy_getinfo(curl, CURLINFO_HTTP_CODE, &estructura.codigo_http);
+ long http_code;
+ curl_easy_getinfo(curl, CURLINFO_HTTP_CODE, &http_code);
+ estructura.codigo_http=(int)(http_code & 0xFFFF);
} else {
|