Commit 6e700dab authored by Max Kellermann's avatar Max Kellermann

CommandLine: hard-code `daemon=false` if ENABLE_DAEMON is not set

parent 35eaed72
...@@ -352,12 +352,16 @@ ParseCommandLine(int argc, char **argv, CommandLineOptions &options, ...@@ -352,12 +352,16 @@ ParseCommandLine(int argc, char **argv, CommandLineOptions &options,
break; break;
case OPTION_NO_DAEMON: case OPTION_NO_DAEMON:
#ifdef ENABLE_DAEMON
options.daemon = false; options.daemon = false;
#endif
break; break;
#ifdef __linux__ #ifdef __linux__
case OPTION_SYSTEMD: case OPTION_SYSTEMD:
#ifdef ENABLE_DAEMON
options.daemon = false; options.daemon = false;
#endif
options.systemd = true; options.systemd = true;
break; break;
#endif #endif
......
...@@ -20,11 +20,18 @@ ...@@ -20,11 +20,18 @@
#ifndef MPD_COMMAND_LINE_HXX #ifndef MPD_COMMAND_LINE_HXX
#define MPD_COMMAND_LINE_HXX #define MPD_COMMAND_LINE_HXX
#include "config.h" // for ENABLE_DAEMON
struct ConfigData; struct ConfigData;
struct CommandLineOptions { struct CommandLineOptions {
bool kill = false; bool kill = false;
#ifdef ENABLE_DAEMON
bool daemon = true; bool daemon = true;
#else
static constexpr bool daemon = false;
#endif
#ifdef __linux__ #ifdef __linux__
bool systemd = false; bool systemd = false;
......
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