diff --git a/examples/client/client.c b/examples/client/client.c index d8486fd985..2a45a9937e 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -801,7 +801,7 @@ static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port, 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"); }