diff --git a/mythtv/libs/libmythbase/mythcorecontext.cpp b/mythtv/libs/libmythbase/mythcorecontext.cpp
index 2637544..4fe6840 100644
a
|
b
|
|
12 | 12 | #include <QNetworkInterface> |
13 | 13 | #include <QNetworkAddressEntry> |
14 | 14 | #include <QLocale> |
| 15 | #include <netdb.h> |
| 16 | #include <sstream> |
15 | 17 | |
16 | 18 | #include <cmath> |
17 | 19 | #include <cstdarg> |
… |
… |
QString MythCoreContext::GetBackendServerIP(const QString &host) |
898 | 900 | #endif |
899 | 901 | if (!ServerPool::DefaultListenIPv4().isEmpty()) |
900 | 902 | addr4 = GetSettingOnHost("BackendServerIP", host, ""); |
| 903 | { |
| 904 | hostent *h = ::gethostbyname(addr4.toAscii().data()); |
| 905 | |
| 906 | std::cerr << "H=" << h << std::endl; |
| 907 | |
| 908 | if(h!=NULL) |
| 909 | { |
| 910 | unsigned char *addr = reinterpret_cast<unsigned char *>(h->h_addr_list[0]); |
| 911 | std::stringstream ss; |
| 912 | for(int i=0;i<4;i++) |
| 913 | { |
| 914 | ss << (i==0 ? "" : "." ) << (int)addr[i]; |
| 915 | } |
| 916 | addr4 = QString::fromStdString(ss.str()); |
| 917 | } |
| 918 | } |
901 | 919 | |
902 | 920 | if (addr6.isEmpty()) |
903 | 921 | { |