Fix preprocessor for ethernet on-demand

This commit is contained in:
Davide De Rosa 2024-01-10 20:13:08 +01:00
parent 413b5c3996
commit 3ad59c1f01
No known key found for this signature in database
GPG Key ID: A48836171C759F5E
1 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ private extension Profile.OnDemand {
rules.append(cellularRule())
}
#endif
#if os(macOS)
#if targetEnvironment(macCatalyst) || os(macOS)
if Utils.hasEthernet() && withEthernetNetwork {
if let rule = ethernetRule() {
rules.append(rule)
@ -123,7 +123,7 @@ private extension Profile.OnDemand {
}
#endif
#if os(macOS)
#if targetEnvironment(macCatalyst) || os(macOS)
func ethernetRule() -> NEOnDemandRule? {
guard let compatibleEthernet = NEOnDemandRuleInterfaceType.compatibleEthernet else {
return nil