-/* 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
*/
#endif
-#ifndef USE_IPHONE
+#ifndef HAVE_MOBILE
# define READ_FILES
#endif
# include <sys/types.h>
# include <sys/time.h>
# include <sys/ipc.h>
-# include <sys/shm.h>
+# ifndef HAVE_ANDROID
+# include <sys/shm.h>
+# endif
# include <sys/socket.h>
# include <netinet/in_systm.h>
# include <netinet/in.h>
# undef HAVE_PING
#endif
-#ifndef USE_IPHONE
+#ifndef HAVE_MOBILE
# define LOAD_FILES
#endif
{
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);
{
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;
if (sb && !pb->lookup_addr)
{
- assert (pb->addrlen);
+ if (!pb->addrlen) abort();
send_ping (pd, sb);
pd->last_pinged = sb;
}