mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge #12941: [Trivial] Ignore macOS daemon() depracation warning
12e7c55
Ignore macOS daemon() depracation warning (Jonas Schnelli)
Pull request description:
`daemon()` is deprecated on OSX since 10.5 (should migrate to `posix_spawn()`). There are no signs `daemon()` will get removed by Apple.
Tree-SHA512: d5bcdc5d6b507576e0358906a73f9c766f2072f4a9aef6bdc559e10dbec95337ffa50a1ccb60f7197591e2e74f87c74c13387de880aaedc6dbf3796253f69561
This commit is contained in:
commit
807d2ac186
@ -139,6 +139,10 @@ bool AppInit(int argc, char* argv[])
|
||||
if (gArgs.GetBoolArg("-daemon", false))
|
||||
{
|
||||
#if HAVE_DECL_DAEMON
|
||||
#if defined(MAC_OSX)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
fprintf(stdout, "Bitcoin server starting\n");
|
||||
|
||||
// Daemonize
|
||||
@ -146,6 +150,9 @@ bool AppInit(int argc, char* argv[])
|
||||
fprintf(stderr, "Error: daemon() failed: %s\n", strerror(errno));
|
||||
return false;
|
||||
}
|
||||
#if defined(MAC_OSX)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#else
|
||||
fprintf(stderr, "Error: -daemon is not supported on this operating system\n");
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user