Skip to content

Commit

Permalink
filesystems/httpdirfs: fix build on 32-bits
Browse files Browse the repository at this point in the history
../src/link.c:998:55: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
  998 |     snprintf(range_str, sizeof(range_str), "%lu-%lu", start, end);
      |                                             ~~~       ^~~~~
      |                                             %zu
../src/link.c:998:62: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
  998 |     snprintf(range_str, sizeof(range_str), "%lu-%lu", start, end);
      |                                                 ~~~          ^~~
      |                                                 %zu
2 errors generated.
  • Loading branch information
pkubaj committed Jan 12, 2025
1 parent b44313a commit c1e50bc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions filesystems/httpdirfs/files/patch-src_link.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- src/link.c.orig 2025-01-12 11:28:19 UTC
+++ src/link.c
@@ -995,7 +995,7 @@ static CURL *Link_download_curl_setup(Link *link, size
size_t end = start + req_size - 1;

char range_str[64];
- snprintf(range_str, sizeof(range_str), "%lu-%lu", start, end);
+ snprintf(range_str, sizeof(range_str), "%zu-%zu", start, end);
lprintf(debug, "%s: %s\n", link->linkname, range_str);

CURL *curl = Link_to_curl(link);

0 comments on commit c1e50bc

Please sign in to comment.