Browse Source

Cast the unsigned constant

ioctlsocket cmd takes a long but FIONBIO can be declared as an unsigned
integer. We cast to avoid sign conversion warnings.
Matt Clarkson 10 years ago
parent
commit
e724d36c28
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -2722,7 +2722,7 @@ static pid_t spawn_process(struct mg_connection *conn,
 static int set_non_blocking_mode(SOCKET sock)
 {
 	unsigned long on = 1;
-	return ioctlsocket(sock, FIONBIO, &on);
+	return ioctlsocket(sock, (long)FIONBIO, &on);
 }
 
 #else