There is an upstream pull request addressing this issue at

https://github.com/bji/libs3/pull/115

I was able to take the patch from said PR and tweak it so it
could be used with the version of the code in Debian, debdiff
attatched.

diff -Nru libs3-2.0/debian/changelog libs3-2.0/debian/changelog
--- libs3-2.0/debian/changelog  2025-05-04 17:12:41.000000000 +0000
+++ libs3-2.0/debian/changelog  2025-06-10 15:28:43.000000000 +0000
@@ -1,3 +1,11 @@
+libs3 (2.0-4.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patch based on upstream pull request 115 to fix types passed to
+    curl_easy_setopt (Closes: #1107408)
+
+ -- Peter Michael Green <plugw...@debian.org>  Tue, 10 Jun 2025 15:28:43 +0000
+
 libs3 (2.0-4.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru libs3-2.0/debian/patches/fix-curl-easy-setopt-types.patch 
libs3-2.0/debian/patches/fix-curl-easy-setopt-types.patch
--- libs3-2.0/debian/patches/fix-curl-easy-setopt-types.patch   1970-01-01 
00:00:00.000000000 +0000
+++ libs3-2.0/debian/patches/fix-curl-easy-setopt-types.patch   2025-06-10 
15:28:43.000000000 +0000
@@ -0,0 +1,95 @@
+This patch is based on the commit described below, taken from upstream pull
+request 115, modified by Peter Michael Green to apply to the Debian package.
+
+commit 01c8c216128f49936ee3fcf7b66905f8813ea0bd
+Author: Mattias Ellert <mattias.ell...@physics.uu.se>
+Date:   Sun May 4 14:33:59 2025 +0200
+
+    Fix warnings from curl 8.14
+    
+    src/request.c:1158:19: error: call to ‘_curl_easy_setopt_err_long’ 
declared with attribute warning: curl_easy_setopt expects a long argument 
[-Werror=attribute-warning]
+
+Index: libs3-2.0.new/src/request.c
+===================================================================
+--- libs3-2.0.new.orig/src/request.c
++++ libs3-2.0.new/src/request.c
+@@ -805,7 +805,7 @@ static S3Status setup_curl(Request *requ
+     }
+ 
+     // Debugging only
+-    // curl_easy_setopt_safe(CURLOPT_VERBOSE, 1);
++    // curl_easy_setopt_safe(CURLOPT_VERBOSE, 1L);
+     
+     // Set private data to request for the benefit of S3RequestContext
+     curl_easy_setopt_safe(CURLOPT_PRIVATE, request);
+@@ -824,16 +824,16 @@ static S3Status setup_curl(Request *requ
+ 
+     // Ask curl to parse the Last-Modified header.  This is easier than
+     // parsing it ourselves.
+-    curl_easy_setopt_safe(CURLOPT_FILETIME, 1);
++    curl_easy_setopt_safe(CURLOPT_FILETIME, 1L);
+ 
+     // Curl docs suggest that this is necessary for multithreaded code.
+     // However, it also points out that DNS timeouts will not be honored
+     // during DNS lookup, which can be worked around by using the c-ares
+     // library, which we do not do yet.
+-    curl_easy_setopt_safe(CURLOPT_NOSIGNAL, 1);
++    curl_easy_setopt_safe(CURLOPT_NOSIGNAL, 1L);
+ 
+     // Turn off Curl's built-in progress meter
+-    curl_easy_setopt_safe(CURLOPT_NOPROGRESS, 1);
++    curl_easy_setopt_safe(CURLOPT_NOPROGRESS, 1L);
+ 
+     // xxx todo - support setting the proxy for Curl to use (can't use https
+     // for proxies though)
+@@ -842,7 +842,7 @@ static S3Status setup_curl(Request *requ
+ 
+     // I think this is useful - we don't need interactive performance, we need
+     // to complete large operations quickly
+-    curl_easy_setopt_safe(CURLOPT_TCP_NODELAY, 1);
++    curl_easy_setopt_safe(CURLOPT_TCP_NODELAY, 1L);
+     
+     // Don't use Curl's 'netrc' feature
+     curl_easy_setopt_safe(CURLOPT_NETRC, CURL_NETRC_IGNORED);
+@@ -850,13 +850,13 @@ static S3Status setup_curl(Request *requ
+     // Don't verify S3's certificate, there are known to be issues with
+     // them sometimes
+     // xxx todo - support an option for verifying the S3 CA (default false)
+-    curl_easy_setopt_safe(CURLOPT_SSL_VERIFYPEER, 0);
++    curl_easy_setopt_safe(CURLOPT_SSL_VERIFYPEER, 0L);
+ 
+     // Follow any redirection directives that S3 sends
+-    curl_easy_setopt_safe(CURLOPT_FOLLOWLOCATION, 1);
++    curl_easy_setopt_safe(CURLOPT_FOLLOWLOCATION, 1L);
+ 
+     // A safety valve in case S3 goes bananas with redirects
+-    curl_easy_setopt_safe(CURLOPT_MAXREDIRS, 10);
++    curl_easy_setopt_safe(CURLOPT_MAXREDIRS, 10L);
+ 
+     // Set the User-Agent; maybe Amazon will track these?
+     curl_easy_setopt_safe(CURLOPT_USERAGENT, userAgentG);
+@@ -865,8 +865,8 @@ static S3Status setup_curl(Request *requ
+     // less than 1K per second for more than 15 seconds.
+     // xxx todo - make these configurable
+     // xxx todo - allow configurable max send and receive speed
+-    curl_easy_setopt_safe(CURLOPT_LOW_SPEED_LIMIT, 1024);
+-    curl_easy_setopt_safe(CURLOPT_LOW_SPEED_TIME, 15);
++    curl_easy_setopt_safe(CURLOPT_LOW_SPEED_LIMIT, 1024L);
++    curl_easy_setopt_safe(CURLOPT_LOW_SPEED_TIME, 15L);
+ 
+     // Append standard headers
+ #define append_standard_header(fieldName)                               \
+@@ -918,11 +918,11 @@ static S3Status setup_curl(Request *requ
+     // Set request type.
+     switch (params->httpRequestType) {
+     case HttpRequestTypeHEAD:
+-    curl_easy_setopt_safe(CURLOPT_NOBODY, 1);
++    curl_easy_setopt_safe(CURLOPT_NOBODY, 1L);
+         break;
+     case HttpRequestTypePUT:
+     case HttpRequestTypeCOPY:
+-        curl_easy_setopt_safe(CURLOPT_UPLOAD, 1);
++        curl_easy_setopt_safe(CURLOPT_UPLOAD, 1L);
+         break;
+     case HttpRequestTypeDELETE:
+     curl_easy_setopt_safe(CURLOPT_CUSTOMREQUEST, "DELETE");
diff -Nru libs3-2.0/debian/patches/series libs3-2.0/debian/patches/series
--- libs3-2.0/debian/patches/series     2022-03-16 10:34:36.000000000 +0000
+++ libs3-2.0/debian/patches/series     2025-06-10 15:15:46.000000000 +0000
@@ -1,3 +1,4 @@
 utsn.patch
 implicit-fallthrough.patch
 pkg-config.patch
+fix-curl-easy-setopt-types.patch

Reply via email to