From: Evgeny Grin Date: Fri, 26 Nov 2021 11:08:22 +0000 (+0300) Subject: sockets: fixed compiler warning on Windows x32 X-Git-Tag: 3.7.3~25^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=1a44ebda71ddd135ba035f4f870a1976d04216a0;p=thirdparty%2Fgnutls.git sockets: fixed compiler warning on Windows x32 Signed-off-by: Evgeny Grin --- diff --git a/lib/system/sockets.c b/lib/system/sockets.c index 57c14f63b8..e1d6fd1842 100644 --- a/lib/system/sockets.c +++ b/lib/system/sockets.c @@ -105,12 +105,14 @@ system_writev(gnutls_transport_ptr_t ptr, const giovec_t * iovec, to_send_cnt++; break; } +#ifdef _WIN64 if (iovec[to_send_cnt].iov_len > ULONG_MAX) { /* WSASend() limitation */ bufs[to_send_cnt].len = ULONG_MAX; to_send_cnt++; break; } +#endif bufs[to_send_cnt].len = (unsigned long) iovec[to_send_cnt].iov_len; to_send_bytes += iovec[to_send_cnt].iov_len;