diff --git a/main/asterisk.c b/main/asterisk.c index 21883c4a00..ab010774d5 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -171,12 +171,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #elif defined(HAVE_SYSCTL) #include #include -#if !defined(__OpenBSD__) #include #if defined(__FreeBSD__) #include #endif -#endif #if defined(HAVE_SWAPCTL) #include #endif diff --git a/main/loader.c b/main/loader.c index b14914acba..5df306c916 100644 --- a/main/loader.c +++ b/main/loader.c @@ -483,7 +483,9 @@ static int is_module_loaded(const char *resource_name) static void unload_dynamic_module(struct ast_module *mod) { +#if defined(HAVE_RTLD_NOLOAD) char *name = ast_strdupa(ast_module_name(mod)); +#endif void *lib = mod->lib; /* WARNING: the structure pointed to by mod is going to diff --git a/main/xmldoc.c b/main/xmldoc.c index e334e878ef..2f4f063b9a 100644 --- a/main/xmldoc.c +++ b/main/xmldoc.c @@ -2979,7 +2979,7 @@ int ast_xmldoc_load_documentation(void) globret = glob(xmlpattern, MY_GLOB_FLAGS, NULL, &globbuf); #endif - ast_debug(3, "gl_pathc %zu\n", globbuf.gl_pathc); + ast_debug(3, "gl_pathc %zu\n", (size_t)globbuf.gl_pathc); if (globret == GLOB_NOSPACE) { ast_log(LOG_WARNING, "XML load failure, glob expansion of pattern '%s' failed: Not enough memory\n", xmlpattern); ast_free(xmlpattern);