diff options
author | jmcneill <jmcneill> | 2015-11-17 16:41:26 +0000 |
---|---|---|
committer | jmcneill <jmcneill> | 2015-11-17 16:41:26 +0000 |
commit | 23c276b7f8123f1a93495eb7fb463adc5765f018 (patch) | |
tree | 88a1f0856993229ee62263ea18f81759c8b65956 /multimedia | |
parent | 8524b94e682c817fd8f63146326843c6c5ed75f7 (diff) | |
download | pkgsrc-23c276b7f8123f1a93495eb7fb463adc5765f018.tar.gz |
do not use _res in a multi-threaded program
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/kodi/distinfo | 4 | ||||
-rw-r--r-- | multimedia/kodi/patches/patch-xbmc_network_linux_NetworkLinux.cpp | 23 |
2 files changed, 22 insertions, 5 deletions
diff --git a/multimedia/kodi/distinfo b/multimedia/kodi/distinfo index 294daf937ee..81c022be08a 100644 --- a/multimedia/kodi/distinfo +++ b/multimedia/kodi/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2015/11/17 16:14:21 jmcneill Exp $ +$NetBSD: distinfo,v 1.3 2015/11/17 16:41:26 jmcneill Exp $ SHA1 (15.2-Isengard.tar.gz) = 4acb4a60eadc7289f873cff5add31693b9520cba RMD160 (15.2-Isengard.tar.gz) = d81d3f15783b2b69920ea85d7e04f01872f2d85f @@ -32,7 +32,7 @@ SHA1 (patch-xbmc_linux_LinuxTimezone.cpp) = 18974ed63d1ac35a4060ea3d01826120b016 SHA1 (patch-xbmc_linux_PlatformDefs.h) = 56d70fce18807b10cb8d42ac0feca94d0c113c57 SHA1 (patch-xbmc_linux_XFileUtils.cpp) = 4c03a869957ca501adaa5dc0d966cfd043e0d5c9 SHA1 (patch-xbmc_linux_XMemUtils.cpp) = a225fd8d90e58c12295c47126c76ded36a5bcec5 -SHA1 (patch-xbmc_network_linux_NetworkLinux.cpp) = 1a5a39e781182ab83a0e524c89e6e2e047178562 +SHA1 (patch-xbmc_network_linux_NetworkLinux.cpp) = febc3a9791d0c087261ccbbecdcffcaa4793e333 SHA1 (patch-xbmc_peripherals_bus_PeripheralBusUSB.h) = e3682d8fbfad9bca11a706c2ca3a77f0a7751e3a SHA1 (patch-xbmc_peripherals_bus_linux_PeripheralBusUSBLibUSB.cpp) = 040678e8379f6797e8276d9787d60fcdb24e17c9 SHA1 (patch-xbmc_settings_Settings.cpp) = aa2426fcd69652bc656dba0b7d92341235309a8f diff --git a/multimedia/kodi/patches/patch-xbmc_network_linux_NetworkLinux.cpp b/multimedia/kodi/patches/patch-xbmc_network_linux_NetworkLinux.cpp index 3cc449c2a20..99a628cd57e 100644 --- a/multimedia/kodi/patches/patch-xbmc_network_linux_NetworkLinux.cpp +++ b/multimedia/kodi/patches/patch-xbmc_network_linux_NetworkLinux.cpp @@ -1,4 +1,4 @@ -$NetBSD: patch-xbmc_network_linux_NetworkLinux.cpp,v 1.1 2015/11/17 14:56:07 jmcneill Exp $ +$NetBSD: patch-xbmc_network_linux_NetworkLinux.cpp,v 1.2 2015/11/17 16:41:26 jmcneill Exp $ --- xbmc/network/linux/NetworkLinux.cpp.orig 2015-10-19 06:31:15.000000000 +0000 +++ xbmc/network/linux/NetworkLinux.cpp @@ -57,7 +57,24 @@ $NetBSD: patch-xbmc_network_linux_NetworkLinux.cpp,v 1.1 2015/11/17 14:56:07 jmc // Query the list of interfaces. struct ifaddrs *list; -@@ -547,7 +549,7 @@ bool CNetworkLinux::PingHost(unsigned lo +@@ -507,6 +509,16 @@ std::vector<std::string> CNetworkLinux:: + + 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 @@ bool CNetworkLinux::PingHost(unsigned lo #if defined (TARGET_DARWIN_IOS) // no timeout option available sprintf(cmd_line, "ping -c 1 %s", inet_ntoa(host_ip)); @@ -66,7 +83,7 @@ $NetBSD: patch-xbmc_network_linux_NetworkLinux.cpp,v 1.1 2015/11/17 14:56:07 jmc 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)); -@@ -568,7 +570,7 @@ bool CNetworkLinux::PingHost(unsigned lo +@@ -568,7 +580,7 @@ bool CNetworkLinux::PingHost(unsigned lo return result == 0; } |