diff options
-rw-r--r-- | config_host/config_features.h.in | 2 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/AvahiNetworkService.hxx | 20 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/DiscoveryService.cxx | 5 |
4 files changed, 8 insertions, 20 deletions
diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in index fac764e1936b..e5d5187d81a1 100644 --- a/config_host/config_features.h.in +++ b/config_host/config_features.h.in @@ -66,4 +66,6 @@ #define HAVE_FEATURE_OPENCL 0 +#define HAVE_FEATURE_AVAHI 0 + #endif diff --git a/configure.ac b/configure.ac index eb6c160fc160..10ffd2acb1d7 100644 --- a/configure.ac +++ b/configure.ac @@ -11393,6 +11393,7 @@ if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_avahi" = "yes"; then [ENABLE_AVAHI="TRUE"], [ENABLE_AVAHI=""]) if test "$ENABLE_AVAHI" = "TRUE"; then AC_DEFINE(ENABLE_AVAHI) + AC_DEFINE(HAVE_FEATURE_AVAHI) AVAHI_CFLAGS=$(printf '%s' "$AVAHI_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g") fi fi diff --git a/sd/source/ui/remotecontrol/AvahiNetworkService.hxx b/sd/source/ui/remotecontrol/AvahiNetworkService.hxx index 005ad359fb73..96e36db233e6 100644 --- a/sd/source/ui/remotecontrol/AvahiNetworkService.hxx +++ b/sd/source/ui/remotecontrol/AvahiNetworkService.hxx @@ -1,23 +1,7 @@ #ifndef AVAHI_NETWORK_SERVICE_H #define AVAHI_NETWORK_SERVICE_H - -#include <errno.h> -#include <stdlib.h> -#include <string.h> -#include <algorithm> -#include <vector> -#include <iostream> - -#include <avahi-client/client.h> -#include <avahi-client/publish.h> -#include <avahi-common/thread-watch.h> - -#include <avahi-common/alternative.h> -#include <avahi-common/malloc.h> -#include <avahi-common/error.h> -#include <avahi-common/timeval.h> - +#include <string> #include "ZeroconfService.hxx" namespace sd { @@ -25,7 +9,7 @@ namespace sd { class AvahiNetworkService : public ZeroconfService { public: - AvahiNetworkService(const std::string& aname = "", uint aport = 1599) + AvahiNetworkService(const std::string& aname = "", unsigned int aport = 1599) : ZeroconfService(aname, aport){} virtual ~AvahiNetworkService(){} diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx index 62c3e6e2aaf9..22aca47fd33f 100644 --- a/sd/source/ui/remotecontrol/DiscoveryService.cxx +++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx @@ -16,6 +16,7 @@ #include <comphelper/processfactory.hxx> #include <rtl/strbuf.hxx> +#include <config_features.h> #include "DiscoveryService.hxx" @@ -43,7 +44,7 @@ #import "OSXNetworkService.hxx" #endif -#ifdef LINUX +#if HAVE_FEATURE_AVAHI #include "AvahiNetworkService.hxx" #endif @@ -60,7 +61,7 @@ DiscoveryService::DiscoveryService() zService = new OSXNetworkService(); #endif -#ifdef ENABLE_AVAHI +#if HAVE_FEATURE_AVAHI // Avahi for Linux char hostname[1024]; hostname[1023] = '\0'; |