Fix LAN detection in wxDialUpManager for macOS

Check for enX interface name for Darwin.

Closes https://github.com/wxWidgets/wxWidgets/pull/676
This commit is contained in:
John Roberts
2018-01-17 12:04:52 +08:00
committed by Vadim Zeitlin
parent 91f54ea7e4
commit 4ad61f3048

View File

@@ -722,11 +722,12 @@ wxDialUpManagerImpl::CheckIfconfig()
hasModem = strstr(output.fn_str(),"ipdptp") != NULL;
hasLAN = strstr(output.fn_str(), "hme") != NULL;
#elif defined(__LINUX__) || defined (__FREEBSD__) || defined (__QNX__) || \
defined(__OPENBSD__)
defined(__OPENBSD__) || defined(__DARWIN__)
hasModem = strstr(output.fn_str(),"ppp") // ppp
|| strstr(output.fn_str(),"sl") // slip
|| strstr(output.fn_str(),"pl"); // plip
hasLAN = strstr(output.fn_str(), "eth") != NULL;
hasLAN = strstr(output.fn_str(), "eth") != NULL
|| strstr(output.fn_str(),"en") != NULL; // en0, en1 osx
#elif defined(__SGI__) // IRIX
hasModem = strstr(output.fn_str(), "ppp") != NULL; // PPP
#elif defined(__HPUX__)