From 4ad61f3048db752d48d988d31c6b3a98dee0dad3 Mon Sep 17 00:00:00 2001 From: John Roberts Date: Wed, 17 Jan 2018 12:04:52 +0800 Subject: [PATCH] Fix LAN detection in wxDialUpManager for macOS Check for enX interface name for Darwin. Closes https://github.com/wxWidgets/wxWidgets/pull/676 --- src/unix/dialup.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/unix/dialup.cpp b/src/unix/dialup.cpp index 14122eb2c1..e9612b6152 100644 --- a/src/unix/dialup.cpp +++ b/src/unix/dialup.cpp @@ -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__)