head 1.4; access; symbols pkgsrc-2020Q1:1.3.0.8 pkgsrc-2020Q1-base:1.3 pkgsrc-2019Q4:1.3.0.30 pkgsrc-2019Q4-base:1.3 pkgsrc-2019Q3:1.3.0.26 pkgsrc-2019Q3-base:1.3 pkgsrc-2019Q2:1.3.0.24 pkgsrc-2019Q2-base:1.3 pkgsrc-2019Q1:1.3.0.22 pkgsrc-2019Q1-base:1.3 pkgsrc-2018Q4:1.3.0.20 pkgsrc-2018Q4-base:1.3 pkgsrc-2018Q3:1.3.0.18 pkgsrc-2018Q3-base:1.3 pkgsrc-2018Q2:1.3.0.16 pkgsrc-2018Q2-base:1.3 pkgsrc-2018Q1:1.3.0.14 pkgsrc-2018Q1-base:1.3 pkgsrc-2017Q4:1.3.0.12 pkgsrc-2017Q4-base:1.3 pkgsrc-2017Q3:1.3.0.10 pkgsrc-2017Q3-base:1.3 pkgsrc-2017Q2:1.3.0.6 pkgsrc-2017Q2-base:1.3 pkgsrc-2017Q1:1.3.0.4 pkgsrc-2017Q1-base:1.3 pkgsrc-2016Q4:1.3.0.2 pkgsrc-2016Q4-base:1.3 pkgsrc-2016Q3:1.2.0.8 pkgsrc-2016Q3-base:1.2 pkgsrc-2016Q2:1.2.0.6 pkgsrc-2016Q2-base:1.2 pkgsrc-2016Q1:1.2.0.4 pkgsrc-2016Q1-base:1.2 pkgsrc-2015Q4:1.2.0.2 pkgsrc-2015Q4-base:1.2; locks; strict; comment @// @; 1.4 date 2020.04.23.17.16.40; author nia; state dead; branches; next 1.3; commitid DD1aFVbW0irt5x5C; 1.3 date 2016.10.23.19.56.18; author christos; state Exp; branches; next 1.2; commitid 7ad69Esq9B2D3jrz; 1.2 date 2015.11.17.16.41.26; author jmcneill; state Exp; branches; next 1.1; commitid CDR7eOdUe4CwWsJy; 1.1 date 2015.11.17.14.56.07; author jmcneill; state Exp; branches; next ; commitid RGLmvn5GiLiimsJy; desc @@ 1.4 log @multimedia: Remove kodi - broken for a long time now If anyone wants to attempt re-packaging a more recent version of kodi I'd recommend starting over (also, happy to help and provide advice). @ text @$NetBSD: patch-xbmc_network_linux_NetworkLinux.cpp,v 1.3 2016/10/23 19:56:18 christos Exp $ We don't have RTF_LLINFO anymore, use getifaddrs() --- xbmc/network/linux/NetworkLinux.cpp.orig 2015-10-19 02:31:15.000000000 -0400 +++ xbmc/network/linux/NetworkLinux.cpp 2016-10-23 15:49:24.032410793 -0400 @@@@ -48,7 +48,7 @@@@ #include "network/osx/ioshacks.h" #endif #include -#elif defined(TARGET_FREEBSD) +#elif defined(TARGET_FREEBSD) || defined(TARGET_NETBSD) #include #include #include @@@@ -94,7 +94,7 @@@@ bool CNetworkInterfaceLinux::IsWireless() { -#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) +#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_NETBSD) return false; #else struct iwreq wrq; @@@@ -218,7 +218,7 @@@@ } if (result.empty()) CLog::Log(LOGWARNING, "Unable to determine gateway"); -#elif defined(TARGET_FREEBSD) +#elif defined(TARGET_FREEBSD) || defined(TARGET_NETBSD) size_t needed; int mib[6]; char *buf, *next, *lim; @@@@ -248,7 +248,9 @@@@ for (next = buf; next < lim; next += rtm->rtm_msglen) { rtm = (struct rt_msghdr *)next; sa = (struct sockaddr *)(rtm + 1); +#if !defined(TARGET_NETBSD) sa = (struct sockaddr *)(SA_SIZE(sa) + (char *)sa); +#endif sockin = (struct sockaddr_in *)sa; if (inet_ntop(AF_INET, &sockin->sin_addr.s_addr, line, sizeof(line)) == NULL) { @@@@ -359,7 +361,7 @@@@ void CNetworkLinux::GetMacAddress(const std::string& interfaceName, char rawMac[6]) { memset(rawMac, 0, 6); -#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) +#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_NETBSD) #if !defined(IFT_ETHER) #define IFT_ETHER 0x6/* Ethernet CSMACD */ @@@@ -411,7 +413,7 @@@@ char macAddrRaw[6]; m_interfaces.clear(); -#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) +#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_NETBSD) // Query the list of interfaces. struct ifaddrs *list; @@@@ -507,6 +509,16 @@@@ if (!result.size()) CLog::Log(LOGWARNING, "Unable to determine nameserver"); +#elif defined(TARGET_NETBSD) + struct __res_state state; + memset(&state, 0, sizeof(state)); + res_ninit(&state); + + for (int i = 0; i < state.nscount; i ++) + { + std::string ns = inet_ntoa(((struct sockaddr_in *)&state.nsaddr_list[i])->sin_addr); + result.push_back(ns); + } #else res_init(); @@@@ -547,7 +559,7 @@@@ #if defined (TARGET_DARWIN_IOS) // no timeout option available sprintf(cmd_line, "ping -c 1 %s", inet_ntoa(host_ip)); -#elif defined (TARGET_DARWIN) || defined (TARGET_FREEBSD) +#elif defined (TARGET_DARWIN) || defined (TARGET_FREEBSD) || defined(TARGET_NETBSD) 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)); @@@@ -618,6 +630,38 @@@@ } return ret; } +#elif defined(TARGET_NETBSD) +#include +#include +#include + +bool CNetworkInterfaceLinux::GetHostMacAddress(unsigned long host_ip, std::string& mac) +{ + const char *iface = m_interfaceName.c_str(); + struct ifaddrs *ifas, *ifa; + int r; + char buf[1024]; + + if (getifaddrs(&ifas) == -1) { + mac = strerror(errno); + return false; + } + for (ifa = ifas; ifa; ifa = ifa->ifa_next) { + if (ifa->ifa_addr->sa_family != AF_LINK) + continue; + if (strcmp(iface, ifa->ifa_name) != 0) + continue; + if ((r = getnameinfo(ifa->ifa_addr, ifa->ifa_addr->sa_len, buf, + sizeof(buf), NULL, 0, NI_NUMERICHOST)) != 0) { + mac = gai_strerror(r); + return false; + } + mac = buf; + break; + } + freeifaddrs(ifas); + return true; +} #else bool CNetworkInterfaceLinux::GetHostMacAddress(unsigned long host_ip, std::string& mac) { @ 1.3 log @We don't have RTF_LLINFO anymore, use getifaddrs @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @do not use _res in a multi-threaded program @ text @d1 1 a1 1 $NetBSD: patch-xbmc_network_linux_NetworkLinux.cpp,v 1.1 2015/11/17 14:56:07 jmcneill Exp $ d3 4 a6 2 --- xbmc/network/linux/NetworkLinux.cpp.orig 2015-10-19 06:31:15.000000000 +0000 +++ xbmc/network/linux/NetworkLinux.cpp d16 1 a16 1 @@@@ -94,7 +94,7 @@@@ std::string& CNetworkInterfaceLinux::Get d25 1 a25 1 @@@@ -218,7 +218,7 @@@@ std::string CNetworkInterfaceLinux::GetC d34 1 a34 1 @@@@ -248,7 +248,9 @@@@ std::string CNetworkInterfaceLinux::GetC d44 1 a44 1 @@@@ -359,7 +361,7 @@@@ CNetworkInterface* CNetworkLinux::GetFir d53 1 a53 1 @@@@ -411,7 +413,7 @@@@ void CNetworkLinux::queryInterfaceList() d62 1 a62 1 @@@@ -507,6 +509,16 @@@@ std::vector CNetworkLinux:: d79 1 a79 1 @@@@ -547,7 +559,7 @@@@ bool CNetworkLinux::PingHost(unsigned lo d88 3 a90 2 @@@@ -568,7 +580,7 @@@@ bool CNetworkLinux::PingHost(unsigned lo return result == 0; d92 33 a124 3 -#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) +#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_NETBSD) a126 1 bool ret = false; @ 1.1 log @Initial import of kodi-15.2 Kodi (formerly known as XBMC) is an award-winning free and open source (GPL) software media center for playing videos, music, pictures, games, and more. Kodi features a 10-foot user interface for use with televisions and remote controls. It allows users to play and view most videos, music, podcasts, and other digital media files from local and network storage media and the internet. @ text @d1 1 a1 1 $NetBSD$ d60 18 a77 1 @@@@ -547,7 +549,7 @@@@ bool CNetworkLinux::PingHost(unsigned lo d86 1 a86 1 @@@@ -568,7 +570,7 @@@@ bool CNetworkLinux::PingHost(unsigned lo @