diff options
author | Siqi <me@siqi.fr> | 2013-07-25 17:59:30 +0200 |
---|---|---|
committer | Siqi <me@siqi.fr> | 2013-07-25 18:28:55 +0200 |
commit | d1a6a00ab873111a6ab8eb7c515ddc65473e260a (patch) | |
tree | aa3b9627e782fb428a2c6b90745952436fd774e9 /sd/source | |
parent | 9a44e90c2c5c19fb310298ed525c2b77f49c97b8 (diff) |
fix for OS where avahi is not present
Change-Id: Ib3e21b786821baa7c3c47755de5125e1de566c39
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/remotecontrol/DiscoveryService.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx index 262c47abc0fb..1b2db7747b10 100644 --- a/sd/source/ui/remotecontrol/DiscoveryService.cxx +++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx @@ -10,7 +10,6 @@ #include <errno.h> #include <stdlib.h> #include <string.h> -#include <unistd.h> #include <algorithm> #include <vector> #include <iostream> @@ -29,6 +28,7 @@ #include <ws2tcpip.h> typedef int socklen_t; #else + #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> @@ -58,12 +58,14 @@ DiscoveryService::DiscoveryService() zService = new OSXNetworkService(); #endif #ifdef LINUX + #ifdef ENABLE_AVAHI // Avahi for Linux char hostname[1024]; hostname[1023] = '\0'; gethostname(hostname, 1023); zService = new AvahiNetworkService(hostname); + #endif #endif zService->setup(); |