From: Arran Cudbard-Bell Date: Thu, 24 May 2018 11:28:06 +0000 (+0600) Subject: Fix naming conflict with osmocom X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e35bc2f99c90b5161863f2dd2ddc69aef510aaf9;p=thirdparty%2Ffreeradius-server.git Fix naming conflict with osmocom --- diff --git a/src/include/log.h b/src/include/log.h index f2a17a9a6c0..1e32c91b2f2 100644 --- a/src/include/log.h +++ b/src/include/log.h @@ -101,9 +101,9 @@ void log_hex(fr_log_t const *log, fr_log_type_t type, fr_log_lvl_t lvl, uint8_t void log_fatal(char const *fmt, ...) CC_HINT(format (printf, 1, 2)) CC_HINT(nonnull) NEVER_RETURNS; -int log_init(fr_log_t *log, bool daemonize); +int log_global_init(fr_log_t *log, bool daemonize); -void log_free(void); +void log_global_free(void); /** Prefix for global log messages * diff --git a/src/main/log.c b/src/main/log.c index 063db5ae9e1..e460ac98f74 100644 --- a/src/main/log.c +++ b/src/main/log.c @@ -786,7 +786,7 @@ void log_fatal(char const *fmt, ...) * - 0 on success. * - -1 on failure. */ -int log_init(fr_log_t *log, bool daemonize) +int log_global_init(fr_log_t *log, bool daemonize) { int ret; @@ -806,7 +806,7 @@ int log_init(fr_log_t *log, bool daemonize) return ret; } -void log_free(void) +void log_global_free(void) { fr_dict_autofree(log_dict); } diff --git a/src/main/radiusd.c b/src/main/radiusd.c index c7e1ed00ff3..86b2e4aeaf6 100644 --- a/src/main/radiusd.c +++ b/src/main/radiusd.c @@ -636,7 +636,7 @@ int main(int argc, char *argv[]) /* * Redirect stderr/stdout as appropriate. */ - if (log_init(&default_log, main_config.daemonize) < 0) fr_exit(EXIT_FAILURE); + if (log_global_init(&default_log, main_config.daemonize) < 0) fr_exit(EXIT_FAILURE); /* * Initialise the state rbtree (used to link multiple rounds of challenges). @@ -833,7 +833,7 @@ int main(int argc, char *argv[]) * Frees request specific logging resources which is OK * because all the requests will have been stopped. */ - log_free(); + log_global_free(); talloc_free(global_state); /* Free state entries */ diff --git a/src/main/unit_test_module.c b/src/main/unit_test_module.c index 05738205ebb..8cfd0f81e33 100644 --- a/src/main/unit_test_module.c +++ b/src/main/unit_test_module.c @@ -827,7 +827,7 @@ int main(int argc, char *argv[]) goto finish; } - if (log_init(&default_log, false) < 0) { + if (log_global_init(&default_log, false) < 0) { rcode = EXIT_FAILURE; goto finish; } @@ -1153,7 +1153,7 @@ finish: /* * Free request specific logging infrastructure */ - log_free(); + log_global_free(); /* * Free xlat instance data, and call any detach methods diff --git a/src/modules/rlm_mschap/rlm_mschap.c b/src/modules/rlm_mschap/rlm_mschap.c index e5279fd246e..7c3629ca94b 100644 --- a/src/modules/rlm_mschap/rlm_mschap.c +++ b/src/modules/rlm_mschap/rlm_mschap.c @@ -2151,7 +2151,11 @@ static int mod_bootstrap(void *instance, CONF_SECTION *conf) /* * Tidy up instance */ -static int mod_detach(UNUSED void *instance) +static int mod_detach( +#ifndef WITH_AUTH_WINBIND + UNUSED +#endif + void *instance) { #ifdef WITH_AUTH_WINBIND rlm_mschap_t *inst = instance;