sd/CppunitTest_sd_uimpress.mk | 18 +++++++++++++----- sd/Library_sd.mk | 8 ++++++++ sd/source/ui/remotecontrol/DiscoveryService.cxx | 4 +++- 3 files changed, 24 insertions(+), 6 deletions(-)
New commits: commit d1a6a00ab873111a6ab8eb7c515ddc65473e260a Author: Siqi <m...@siqi.fr> Date: Thu Jul 25 17:59:30 2013 +0200 fix for OS where avahi is not present Change-Id: Ib3e21b786821baa7c3c47755de5125e1de566c39 diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk index c1a66ca..af4b821 100644 --- a/sd/CppunitTest_sd_uimpress.mk +++ b/sd/CppunitTest_sd_uimpress.mk @@ -72,13 +72,21 @@ $(eval $(call gb_CppunitTest_use_system_darwin_frameworks,sd_uimpress,\ endif ifeq ($(OS), LINUX) -$(eval $(call gb_CppunitTest_use_externals,sd_uimpress,\ - boost_headers \ - gtk \ - dbus \ - avahi \ +ifeq ($(ENABLE_AVAHI),TRUE) +$(eval $(call gb_Library_use_externals,sd,\ + boost_headers \ + gtk \ + dbus \ + avahi \ )) else +$(eval $(call gb_Library_use_externals,sd,\ + boost_headers \ + gtk \ + dbus \ +)) +endif +else $(eval $(call gb_CppunitTest_use_externals,sd_uimpress,\ boost_headers \ gtk \ diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index 9466102..f74514b 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -95,6 +95,7 @@ $(eval $(call gb_Library_use_libraries,sd,\ )) ifeq ($(OS), LINUX) +ifeq ($(ENABLE_AVAHI),TRUE) $(eval $(call gb_Library_use_externals,sd,\ boost_headers \ libxml2 \ @@ -108,6 +109,13 @@ $(eval $(call gb_Library_use_externals,sd,\ dbus \ )) endif +else +$(eval $(call gb_Library_use_externals,sd,\ + boost_headers \ + libxml2 \ + dbus \ +)) +endif ifeq ($(OS),WNT) $(eval $(call gb_Library_use_system_win32_libs,sd,\ diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx index 262c47a..1b2db77 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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits