Fix casts depending on OS

pull/7520/head
Andras Fekete 2024-05-13 13:45:22 -04:00
parent a59a3d109f
commit a1797f0d0d
1 changed files with 3 additions and 3 deletions

View File

@ -801,7 +801,7 @@ doExit:
if (exitWithRet)
return err;
#ifdef __MINGW32__
#if defined(__MINGW32__) || defined(_WIN32)
#define SIZE_FMT "%d"
#define SIZE_TYPE int
#else
@ -852,7 +852,7 @@ static int StartTLS_Init(SOCKET_T* sockfd)
}
/* C: EHLO mail.example.com */
if (send(*sockfd, starttlsCmd[1], XSTRLEN(starttlsCmd[1]), 0) !=
if (send(*sockfd, starttlsCmd[1], (SIZE_TYPE)XSTRLEN(starttlsCmd[1]), 0) !=
(int)XSTRLEN(starttlsCmd[1]))
err_sys("failed to send STARTTLS EHLO command\n");
@ -869,7 +869,7 @@ static int StartTLS_Init(SOCKET_T* sockfd)
}
/* C: STARTTLS */
if (send(*sockfd, starttlsCmd[3], XSTRLEN(starttlsCmd[3]), 0) !=
if (send(*sockfd, starttlsCmd[3], (SIZE_TYPE)XSTRLEN(starttlsCmd[3]), 0) !=
(int)XSTRLEN(starttlsCmd[3])) {
err_sys("failed to send STARTTLS command\n");
}