-int main(int argc, char *argv[]) {
- GMainLoop *loop = NULL;
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+ int error;
+ AvahiSimplePoll *simple_poll;
+ struct timeval tv;
+ struct AvahiServerConfig config;
+
+ simple_poll = avahi_simple_poll_new();
+ poll_api = avahi_simple_poll_get(simple_poll);
+
+ avahi_server_config_init(&config);
+ config.publish_workstation = 0;
+ config.use_ipv6 = 0;
+ config.publish_domain = 0;
+ config.publish_hinfo = 0;
+ avahi = avahi_server_new(poll_api, &config, server_callback, NULL, &error);
+ avahi_server_config_free(&config);