X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fsonar-icmp.c;h=8256270b36a4af185c31c55b8b183c21cbefee38;hb=d6b0217f2417bd19187f0ebc389d6c5c2233b11c;hp=50861259e768e8bca7305d37db57c9b33ecf2da6;hpb=d1ae2829ff0fd2a96c16a0c8c5420efaa47d7b30;p=xscreensaver diff --git a/hacks/glx/sonar-icmp.c b/hacks/glx/sonar-icmp.c index 50861259..8256270b 100644 --- a/hacks/glx/sonar-icmp.c +++ b/hacks/glx/sonar-icmp.c @@ -1,4 +1,4 @@ -/* sonar, Copyright (c) 1998-2012 Jamie Zawinski and Stephen Martin +/* sonar, Copyright (c) 1998-2016 Jamie Zawinski and Stephen Martin * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -40,7 +40,7 @@ */ #endif -#ifndef USE_IPHONE +#ifndef HAVE_MOBILE # define READ_FILES #endif @@ -53,7 +53,9 @@ # include # include # include -# include +# ifndef HAVE_ANDROID +# include +# endif # include # include # include @@ -88,7 +90,7 @@ # undef HAVE_PING #endif -#ifndef USE_IPHONE +#ifndef HAVE_MOBILE # define LOAD_FILES #endif @@ -448,7 +450,7 @@ read_hosts_file (sonar_sensor_data *ssd, const char *filename) { char buf[1024]; sprintf(buf, "%s: %s", progname, filename); -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ if (pd->debug_p) /* on OSX don't syslog this */ #endif perror (buf); @@ -1048,7 +1050,7 @@ get_ping (sonar_sensor_data *ssd) { ping_data *pd = (ping_data *) ssd->closure; struct sockaddr from; - unsigned int fromlen; /* Posix says socklen_t, but that's not portable */ + socklen_t fromlen; int result; u_char packet[1024]; struct timeval now; @@ -1410,7 +1412,7 @@ ping_scan (sonar_sensor_data *ssd) if (sb && !pb->lookup_addr) { - assert (pb->addrlen); + if (!pb->addrlen) abort(); send_ping (pd, sb); pd->last_pinged = sb; }