-static void resolve_callback(AvahiServiceResolver *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const gchar *name,const gchar *type,const gchar *domain, const gchar *host_name, const AvahiAddress *address, guint16 port, AvahiStringList *txt, gpointer userdata) {
- g_assert(r);
+#include <avahi-core/core.h>
+#include <avahi-common/simple-watch.h>
+#include <avahi-common/malloc.h>
+
+static AvahiSimplePoll *simple_poll = NULL;
+
+static void resolve_callback(
+ AvahiSServiceResolver *r,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ AvahiResolverEvent event,
+ const char *name,
+ const char *type,
+ const char *domain,
+ const char *host_name,
+ const AvahiAddress *address,
+ uint16_t port,
+ AvahiStringList *txt,
+ void* userdata) {
+
+ assert(r);