Move external definitions of functions in ifchd.c to ifchd.h instead of

defining them manually in ndhc.c.
This commit is contained in:
Nicholas J. Kain 2014-03-12 16:13:47 -04:00
parent 9bf79b6034
commit b9a30f0653
2 changed files with 6 additions and 7 deletions

View File

@ -29,6 +29,11 @@ struct ifchd_client {
char domains[MAX_BUF];
};
extern int allow_hostname;
extern char pidfile_ifch[MAX_PATH_LENGTH];
extern uid_t ifch_uid;
extern gid_t ifch_gid;
extern void perform_timezone(const char *str, size_t len);
extern void perform_dns(const char *str, size_t len);
extern void perform_lprsvr(const char *str, size_t len);

View File

@ -68,6 +68,7 @@
#include "pidfile.h"
#include "io.h"
#include "seccomp.h"
#include "ifchd.h"
struct client_state_t cs = {
.init = 1,
@ -316,13 +317,6 @@ static void ndhc_main(void) {
do_ndhc_work();
}
// XXX: Move to a header.
extern int allow_hostname;
extern char pidfile_ifch[MAX_PATH_LENGTH];
extern uid_t ifch_uid;
extern gid_t ifch_gid;
extern void ifch_main(void);
int main(int argc, char **argv)
{
static const struct option arg_options[] = {