aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-22 13:33:23 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-22 13:33:23 +0000
commit9760c92f4360dd0b8c49ff909ac90790a8072702 (patch)
tree4c72061244755a18c6e7162404c68fb4a44d473c /main
parent09773d1c9a438690087857e37d816ecce81ad8ac (diff)
Fixes for building under OpenSolaris.
(closes issue #11047) Reported by: snuffy Patches: 11047-fixes.diff uploaded by snuffy (license 35) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86630 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/loader.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/loader.c b/main/loader.c
index 69d0be52c..7df486251 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -318,7 +318,7 @@ static struct ast_module *find_resource(const char *resource, int do_lock)
return cur;
}
-#if LOADABLE_MODULES
+#ifdef LOADABLE_MODULES
static void unload_dynamic_module(struct ast_module *mod)
{
void *lib = mod->lib;
@@ -502,7 +502,7 @@ int ast_unload_resource(const char *resource_name, enum ast_module_unload_mode f
AST_LIST_UNLOCK(&module_list);
-#if LOADABLE_MODULES
+#ifdef LOADABLE_MODULES
if (!error)
unload_dynamic_module(mod);
#endif
@@ -630,7 +630,7 @@ static enum ast_module_load_result load_resource(const char *resource_name, unsi
if (global_symbols_only && !ast_test_flag(mod->info, AST_MODFLAG_GLOBAL_SYMBOLS))
return AST_MODULE_LOAD_SKIP;
} else {
-#if LOADABLE_MODULES
+#ifdef LOADABLE_MODULES
if (!(mod = load_dynamic_module(resource_name, global_symbols_only))) {
/* don't generate a warning message during load_modules() */
if (!global_symbols_only) {
@@ -648,7 +648,7 @@ static enum ast_module_load_result load_resource(const char *resource_name, unsi
if (inspect_module(mod)) {
ast_log(LOG_WARNING, "Module '%s' could not be loaded.\n", resource_name);
-#if LOADABLE_MODULES
+#ifdef LOADABLE_MODULES
unload_dynamic_module(mod);
#endif
return AST_MODULE_LOAD_DECLINE;
@@ -731,7 +731,7 @@ int load_modules(unsigned int preload_only)
unsigned int load_count;
struct load_order load_order;
int res = 0;
-#if LOADABLE_MODULES
+#ifdef LOADABLE_MODULES
struct dirent *dirent;
DIR *dir;
#endif
@@ -771,7 +771,7 @@ int load_modules(unsigned int preload_only)
order = add_to_load_order(mod->resource, &load_order);
}
-#if LOADABLE_MODULES
+#ifdef LOADABLE_MODULES
/* if we are allowed to load dynamic modules, scan the directory for
for all available modules and add them as well */
if ((dir = opendir(ast_config_AST_MODULE_DIR))) {