[FreeBSD] ping use -t for timeout like OSX
authorFneufneu <fneufneu@xbmc.org>
Mon, 17 Jun 2013 05:12:21 +0000 (07:12 +0200)
committerFneufneu <fneufneu@xbmc.org>
Mon, 17 Jun 2013 05:12:21 +0000 (07:12 +0200)
xbmc/network/linux/NetworkLinux.cpp

index 726d4e4..0674f45 100644 (file)
@@ -540,7 +540,7 @@ bool CNetworkLinux::PingHost(unsigned long remote_ip, unsigned int timeout_ms)
 
 #if defined (TARGET_DARWIN_IOS) // no timeout option available
   sprintf(cmd_line, "ping -c 1 %s", inet_ntoa(host_ip));
-#elif defined (TARGET_DARWIN)
+#elif defined (TARGET_DARWIN) || defined (TARGET_FREEBSD)
   sprintf(cmd_line, "ping -c 1 -t %d %s", timeout_ms / 1000 + (timeout_ms % 1000) != 0, inet_ntoa(host_ip));
 #else
   sprintf(cmd_line, "ping -c 1 -w %d %s", timeout_ms / 1000 + (timeout_ms % 1000) != 0, inet_ntoa(host_ip));