diff --git a/lib/connect.c b/lib/connect.c
index 3de043b94..1aedcbfcf 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -169,7 +169,7 @@ int Curl_nonblock(int sockfd,    /* operate on this */
  */
 static
 int waitconnect(int sockfd, /* socket */
-                int timeout_msec)
+                long timeout_msec)
 {
   fd_set fd;
   fd_set errfd;