]> git.meshlink.io Git - catta/blobdiff - avahi-daemon/main.c
hide some more files
[catta] / avahi-daemon / main.c
index d0db0dd1b16cceb671e01648856787fba462dc12..2565f0240903bcd9d45acc44c182d6630b10aecd 100644 (file)
 
 #include "main.h"
 #include "simple-protocol.h"
-#include "dbus-protocol.h"
 #include "static-services.h"
 #include "ini-file-parser.h"
 
+#ifdef HAVE_DBUS
+#include "dbus-protocol.h"
+#endif
+
 AvahiServer *avahi_server = NULL;
 
 typedef enum {
@@ -208,7 +211,7 @@ static void server_callback(AvahiServer *s, AvahiServerState state, void *userda
 
     avahi_server = s;
     
-#ifdef ENABLE_DBUS
+#ifdef HAVE_DBUS
     if (c->enable_dbus)
         dbus_protocol_server_state_changed(state);
 #endif
@@ -254,7 +257,7 @@ static void help(FILE *f, const char *argv0) {
             "    -f --file=FILE     Load the specified configuration file instead of\n"
             "                       "AVAHI_CONFIG_FILE"\n"
             "       --no-rlimits    Don't enforce resource limits\n"
-            "       --no-drop-root  Don't drop priviliges\n"
+            "       --no-drop-root  Don't drop privileges\n"
             "       --debug         Increase verbosity\n",
             argv0);
 }
@@ -269,7 +272,7 @@ static int parse_command_line(DaemonConfig *c, int argc, char *argv[]) {
         OPTION_DEBUG
     };
     
-    static const struct option const long_options[] = {
+    static const struct option long_options[] = {
         { "help",         no_argument,       NULL, 'h' },
         { "daemonize",    no_argument,       NULL, 'D' },
         { "kill",         no_argument,       NULL, 'k' },
@@ -477,7 +480,7 @@ finish:
 
 static void log_function(AvahiLogLevel level, const char *txt) {
 
-    static const int const log_level_map[] = {
+    static const int log_level_map[] = {
         LOG_ERR,
         LOG_WARNING,
         LOG_NOTICE,
@@ -580,7 +583,7 @@ static int run_server(DaemonConfig *c) {
     if (simple_protocol_setup(poll_api) < 0)
         goto finish;
     
-#ifdef ENABLE_DBUS
+#ifdef HAVE_DBUS
     if (c->enable_dbus)
         if (dbus_protocol_setup(poll_api) < 0)
             goto finish;