X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fsonar.c;h=3a3e6ce883e243eae5a35a9a231b356412cd8c97;hp=1988821bd3612c32dc99aceef288711daeba2d32;hb=a94197e76a5dea5cb60542840809d6c20d0abbf3;hpb=8eb2873d7054e705c4e83f22d18c40946a9e2529 diff --git a/hacks/sonar.c b/hacks/sonar.c index 1988821b..3a3e6ce8 100644 --- a/hacks/sonar.c +++ b/hacks/sonar.c @@ -38,7 +38,7 @@ * software for any purpose. It is provided "as is" without express or * implied warranty. * - * $Revision: 1.20 $ + * $Revision: 1.21 $ * * Version 1.0 April 27, 1998. * - Initial version @@ -1153,7 +1153,12 @@ getping(sonar_info *si, ping_info *pi) while (! timer_expired) { tv.tv_usec=pi->timeout; tv.tv_sec=0; +#if 0 + /* This breaks on BSD, which uses bzero() in the definition of FD_ZERO */ FD_ZERO(&rfds); +#else + memset (&rfds, 0, sizeof(rfds)); +#endif FD_SET(pi->icmpsock,&rfds); /* only wait a little while, in case we raced with the timer expiration. From Valentijn Sessink */