From: Michael Tremer Date: Tue, 24 Mar 2026 17:31:42 +0000 (+0000) Subject: httpclient: Pass any numeric arguments to libcurl as long X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd04932607520d1f03cc6c390a7bdd9fe286ce67;p=pakfire.git httpclient: Pass any numeric arguments to libcurl as long Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/httpclient.c b/src/pakfire/httpclient.c index 94181ca6..520c92f2 100644 --- a/src/pakfire/httpclient.c +++ b/src/pakfire/httpclient.c @@ -617,7 +617,7 @@ static int pakfire_httpclient_setup_curl(pakfire_httpclient* self) { } // Set the number of open idle connections - r = curl_multi_setopt(self->curl, CURLMOPT_MAXCONNECTS, 16); + r = curl_multi_setopt(self->curl, CURLMOPT_MAXCONNECTS, 16L); if (r) { ERROR(self->ctx, "Could not set max parallel transfers: %s\n", curl_multi_strerror(r)); @@ -626,7 +626,7 @@ static int pakfire_httpclient_setup_curl(pakfire_httpclient* self) { } // Do not open more than eight connections to the same host - r = curl_multi_setopt(self->curl, CURLMOPT_MAX_HOST_CONNECTIONS, 8); + r = curl_multi_setopt(self->curl, CURLMOPT_MAX_HOST_CONNECTIONS, 8L); if (r) { ERROR(self->ctx, "Could not set max host connections: %s\n", curl_multi_strerror(r)); @@ -635,7 +635,7 @@ static int pakfire_httpclient_setup_curl(pakfire_httpclient* self) { } // Limit total number of open connections - r = curl_multi_setopt(self->curl, CURLMOPT_MAX_TOTAL_CONNECTIONS, 64); + r = curl_multi_setopt(self->curl, CURLMOPT_MAX_TOTAL_CONNECTIONS, 64L); if (r) { ERROR(self->ctx, "Could not set max total connections: %s\n", curl_multi_strerror(r));