ports/filesystems/httpdirfs/files/patch-src_link.c
Piotr Kubaj c1e50bcc62 filesystems/httpdirfs: fix build on 32-bits
../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.
2025-01-12 22:41:54 +01:00

11 lines
437 B
C

--- 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);