$NetBSD: patch-aa,v 1.3 2005/11/03 16:45:13 tv Exp $ --- osfinger.c.orig 2002-07-21 02:49:32.000000000 -0400 +++ osfinger.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include "arirang.h" @@ -71,7 +72,14 @@ osdetect(char *scanhost) } snprintf(osfinger, sizeof(osfinger), "GET %s%s HTTP/1.0\n\n", NETCRAFT_FINGER, scanhost); send(sock, osfinger, strlen(osfinger), 0); - recv(sock, headBuff, sizeof(headBuff), MSG_WAITALL); + + { + int toRead = sizeof(headBuff); + int wasRead; + + while ((wasRead = recv(sock, headBuff, toRead, 0)) > 0) + toRead -= wasRead; + } ptr = strstr(headBuff, "running ");