Skip to content

libssh: fix 64-bit printf mask for mingw-w64 <=6.0.0#21229

Closed
vszakats wants to merge 2 commits intocurl:masterfrom
vszakats:libsshmaskoldmingw
Closed

libssh: fix 64-bit printf mask for mingw-w64 <=6.0.0#21229
vszakats wants to merge 2 commits intocurl:masterfrom
vszakats:libsshmaskoldmingw

Conversation

@vszakats
Copy link
Copy Markdown
Member

@vszakats vszakats commented Apr 5, 2026

Fixing (dl-mingw, CM 6.4.0-i686 (mingw-w64 5.0.0) schannel !unity):

lib/vssh/libssh.c: In function 'myssh_in_SFTP_QUOTE_STATVFS':
lib/vssh/libssh.c:573:31: error: ISO C does not support the 'I' printf flag [-Werror=format=]
     char *tmp = curl_maprintf("statvfs:\n"
                               ^~~~~~~~~~~~
lib/vssh/libssh.c:573:31: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint64_t {aka long long unsigned int}' [-Werror=format=]
lib/vssh/libssh.c:573:31: error: ISO C does not support the 'I' printf flag [-Werror=format=]
[...]

Ref: https://github.com/curl/curl/actions/runs/24002480364/job/70000685821

mingw-w64 <=6.0.0 define PRIu64 like this:

./inttypes.h:#define PRIu64 "I64u"

Follow-up to 413a0fe #12346
Cherry-picked from #21227

dl-mingw, CM 6.4.0-i686 (mingw-w64 5.0.0) schannel !unity:
```
lib/vssh/libssh.c: In function 'myssh_in_SFTP_QUOTE_STATVFS':
lib/vssh/libssh.c:573:31: error: ISO C does not support the 'I' printf flag [-Werror=format=]
     char *tmp = curl_maprintf("statvfs:\n"
                               ^~~~~~~~~~~~
lib/vssh/libssh.c:573:31: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint64_t {aka long long unsigned int}' [-Werror=format=]
lib/vssh/libssh.c:573:31: error: ISO C does not support the 'I' printf flag [-Werror=format=]
[...]
```
Ref: https://github.com/curl/curl/actions/runs/24002480364/job/70000685821

Follow-up to 413a0fe curl#12346
Cherry-picked from curl#21227
@vszakats vszakats added build Windows Windows-specific labels Apr 5, 2026
@vszakats vszakats marked this pull request as draft April 5, 2026 14:33
@vszakats vszakats marked this pull request as ready for review April 5, 2026 14:40
@vszakats vszakats closed this in 20756bc Apr 5, 2026
@vszakats vszakats deleted the libsshmaskoldmingw branch April 5, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant