diff --git a/lib/connect.c b/lib/connect.c
index b8e1e7158a6b83df5e23acd0022d1fa15d29d238..e982ddfafaea4aee325f92e6dfd83203f69a38aa 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -212,7 +212,7 @@ int waitconnect(curl_socket_t sockfd, /* socket */
 #endif
 
   /* now select() until we get connect or timeout */
-  rc = Curl_select(CURL_SOCKET_BAD, sockfd, timeout_msec);
+  rc = Curl_select(CURL_SOCKET_BAD, sockfd, (int)timeout_msec);
   if(-1 == rc)
     /* error, no connect here, try next */
     return WAITCONN_SELECT_ERROR;
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 1afcb8e542f29dd3e8a8b75ac03a8a5f2cf238c4..8b248628b973aea38856793bee2da3d413226d1b 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -1374,7 +1374,7 @@ Curl_SSLConnect(struct connectdata *conn,
       break;
 
     while(1) {
-      what = Curl_select(readfd, writefd, timeout_ms);
+      what = Curl_select(readfd, writefd, (int)timeout_ms);
       if(what > 0)
         /* reabable or writable, go loop in the outer loop */
         break;