Fixed broken build without AVAHI support

This commit is contained in:
Andrea Bondavalli 2023-02-25 22:45:36 +01:00
parent 7bf73823c6
commit 5d5ddf280c
2 changed files with 4 additions and 0 deletions

View File

@ -55,6 +55,7 @@ class MDNSClient {
virtual void on_remove_rtsp_source(const std::string& name, virtual void on_remove_rtsp_source(const std::string& name,
const std::string& domain){}; const std::string& domain){};
#ifdef _USE_AVAHI_
static void resolve_callback(AvahiServiceResolver* r, static void resolve_callback(AvahiServiceResolver* r,
AvahiIfIndex interface, AvahiIfIndex interface,
AvahiProtocol protocol, AvahiProtocol protocol,
@ -80,6 +81,7 @@ class MDNSClient {
static void client_callback(AvahiClient* c, static void client_callback(AvahiClient* c,
AvahiClientState state, AvahiClientState state,
void* userdata); void* userdata);
#endif
void process_results(); void process_results();

View File

@ -55,6 +55,7 @@ class MDNSServer {
bool remove_service(const std::string& name); bool remove_service(const std::string& name);
protected: protected:
#ifdef _USE_AVAHI_
static void entry_group_callback(AvahiEntryGroup* g, static void entry_group_callback(AvahiEntryGroup* g,
AvahiEntryGroupState state, AvahiEntryGroupState state,
void* userdata); void* userdata);
@ -63,6 +64,7 @@ class MDNSServer {
void* userdata); void* userdata);
bool create_services(AvahiClient* client); bool create_services(AvahiClient* client);
#endif
private: private:
std::atomic_bool running_{false}; std::atomic_bool running_{false};