Commit bdb1965b authored by Eugeny N Dzhurinsky's avatar Eugeny N Dzhurinsky Committed by Max Kellermann

cmdline: renamed options.stderr to options.log_stderr

On FreeBSD, "stderr" is a macro, and using this name for a struct member breaks the build. [mk: renamed _stderr to log_stderr]
parent c9d43b4d
...@@ -96,9 +96,9 @@ void parse_cmdline(int argc, char **argv, struct options *options) ...@@ -96,9 +96,9 @@ void parse_cmdline(int argc, char **argv, struct options *options)
"don't create database, even if it doesn't exist", NULL }, "don't create database, even if it doesn't exist", NULL },
{ "no-daemon", 0, 0, G_OPTION_ARG_NONE, &option_no_daemon, { "no-daemon", 0, 0, G_OPTION_ARG_NONE, &option_no_daemon,
"don't detach from console", NULL }, "don't detach from console", NULL },
{ "stdout", 0, 0, G_OPTION_ARG_NONE, &options->stderr, { "stdout", 0, 0, G_OPTION_ARG_NONE, &options->log_stderr,
NULL, NULL }, NULL, NULL },
{ "stderr", 0, 0, G_OPTION_ARG_NONE, &options->stderr, { "stderr", 0, 0, G_OPTION_ARG_NONE, &options->log_stderr,
"print messages to stderr", NULL }, "print messages to stderr", NULL },
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &options->verbose, { "verbose", 'v', 0, G_OPTION_ARG_NONE, &options->verbose,
"verbose logging", NULL }, "verbose logging", NULL },
...@@ -109,7 +109,7 @@ void parse_cmdline(int argc, char **argv, struct options *options) ...@@ -109,7 +109,7 @@ void parse_cmdline(int argc, char **argv, struct options *options)
options->kill = false; options->kill = false;
options->daemon = true; options->daemon = true;
options->stderr = false; options->log_stderr = false;
options->verbose = false; options->verbose = false;
options->create_db = 0; options->create_db = 0;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
struct options { struct options {
gboolean kill; gboolean kill;
gboolean daemon; gboolean daemon;
gboolean stderr; gboolean log_stderr;
gboolean verbose; gboolean verbose;
int create_db; int create_db;
}; };
......
...@@ -307,7 +307,7 @@ int main(int argc, char *argv[]) ...@@ -307,7 +307,7 @@ int main(int argc, char *argv[])
stats_global_init(); stats_global_init();
tag_lib_init(); tag_lib_init();
log_init(options.verbose, options.stderr); log_init(options.verbose, options.log_stderr);
listen_global_init(); listen_global_init();
...@@ -347,7 +347,7 @@ int main(int argc, char *argv[]) ...@@ -347,7 +347,7 @@ int main(int argc, char *argv[])
daemonize(options.daemon); daemonize(options.daemon);
setup_log_output(options.stderr); setup_log_output(options.log_stderr);
initSigHandlers(); initSigHandlers();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment