diff --git a/dom/presentation/provider/PresentationDeviceProviderModule.cpp b/dom/presentation/provider/PresentationDeviceProviderModule.cpp index 9819937f415a..aafbed0af3d8 100644 --- a/dom/presentation/provider/PresentationDeviceProviderModule.cpp +++ b/dom/presentation/provider/PresentationDeviceProviderModule.cpp @@ -28,7 +28,7 @@ static const mozilla::Module::ContractIDEntry kPresentationDeviceProviderContrac }; static const mozilla::Module::CategoryEntry kPresentationDeviceProviderCategories[] = { -#if defined(MOZ_WIDGET_ANDROID) || (defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 16) +#if defined(MOZ_WIDGET_COCOA) || defined(MOZ_WIDGET_ANDROID) || (defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 16) { PRESENTATION_DEVICE_PROVIDER_CATEGORY, "MulticastDNSDeviceProvider", MULTICAST_DNS_PROVIDER_CONTRACT_ID }, #endif { nullptr } diff --git a/netwerk/dns/mdns/libmdns/moz.build b/netwerk/dns/mdns/libmdns/moz.build index 2012f423d143..6671b5c177fa 100644 --- a/netwerk/dns/mdns/libmdns/moz.build +++ b/netwerk/dns/mdns/libmdns/moz.build @@ -10,23 +10,25 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': 'nsDNSServiceDiscovery.manifest', ] -elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] >= '16': +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' or \ + (CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] >= '16'): UNIFIED_SOURCES += [ 'MDNSResponderOperator.cpp', 'MDNSResponderReply.cpp', 'nsDNSServiceDiscovery.cpp', ] - LOCAL_INCLUDES += [ - '%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [ - 'external/mdnsresponder/mDNSShared', - ] - ] - LOCAL_INCLUDES += [ '/netwerk/base', ] + if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': + LOCAL_INCLUDES += [ + '%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [ + 'external/mdnsresponder/mDNSShared', + ] + ] + UNIFIED_SOURCES += [ 'nsDNSServiceInfo.cpp', 'nsMulticastDNSModule.cpp', diff --git a/netwerk/dns/mdns/libmdns/nsDNSServiceDiscovery.cpp b/netwerk/dns/mdns/libmdns/nsDNSServiceDiscovery.cpp index 8dec157c3fff..8ffa74b71cb9 100644 --- a/netwerk/dns/mdns/libmdns/nsDNSServiceDiscovery.cpp +++ b/netwerk/dns/mdns/libmdns/nsDNSServiceDiscovery.cpp @@ -4,12 +4,15 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsDNSServiceDiscovery.h" -#include #include "MDNSResponderOperator.h" #include "nsICancelable.h" #include "nsXULAppAPI.h" #include "private/pprio.h" +#ifdef MOZ_WIDGET_GONK +#include +#endif // MOZ_WIDGET_GONK + namespace mozilla { namespace net { @@ -18,6 +21,7 @@ namespace { inline void StartService() { +#ifdef MOZ_WIDGET_GONK char value[PROPERTY_VALUE_MAX] = { '\0' }; property_get("init.svc.mdnsd", value, ""); @@ -25,11 +29,13 @@ StartService() return; } property_set("ctl.start", "mdnsd"); +#endif // MOZ_WIDGET_GONK } inline void StopService() { +#ifdef MOZ_WIDGET_GONK char value[PROPERTY_VALUE_MAX] = { '\0' }; property_get("init.svc.mdnsd", value, ""); @@ -37,6 +43,7 @@ StopService() return; } property_set("ctl.stop", "mdnsd"); +#endif // MOZ_WIDGET_GONK } class ServiceCounter diff --git a/netwerk/dns/mdns/libmdns/nsMulticastDNSModule.cpp b/netwerk/dns/mdns/libmdns/nsMulticastDNSModule.cpp index 1ab3993e762c..22bad3bc754e 100644 --- a/netwerk/dns/mdns/libmdns/nsMulticastDNSModule.cpp +++ b/netwerk/dns/mdns/libmdns/nsMulticastDNSModule.cpp @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 16 +#if defined(MOZ_WIDGET_COCOA) || (defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 16) #define ENABLE_DNS_SERVICE_DISCOVERY #endif