core-lightning/common/daemon.h
Wladimir J. van der Laan e4c6fd89b7 Add missing extern qualifiers for gcc 10
GCC 10 defaults to `-fno-common`. no longer automatically sharing
global variable definitions, which makes it important to define
them in only one place (otherwise there will be duplicate definition
errors). Add `extern` qualifiers where (I think) is the best place for
them.
2020-02-02 12:59:17 +10:30

24 lines
680 B
C

#ifndef LIGHTNING_COMMON_DAEMON_H
#define LIGHTNING_COMMON_DAEMON_H
#include "config.h"
#include <poll.h>
/* Common setup for all daemons */
void daemon_setup(const char *argv0,
void (*backtrace_print)(const char *fmt, ...),
void (*backtrace_exit)(void));
/* Exposed for lightningd's use. */
int daemon_poll(struct pollfd *fds, nfds_t nfds, int timeout);
/* Print a backtrace to stderr, and via backtrace_print */
void send_backtrace(const char *why);
/* Shutdown for a valgrind-clean exit (frees everything) */
void daemon_shutdown(void);
/* Kick in a debugger if they set --debugger */
void daemon_maybe_debug(char *argv[]);
#endif /* LIGHTNING_COMMON_DAEMON_H */