Index: include/asterisk/module.h =================================================================== --- include/asterisk/module.h (revision 91033) +++ include/asterisk/module.h (working copy) @@ -179,6 +179,7 @@ enum ast_module_flags { AST_MODFLAG_DEFAULT = 0, AST_MODFLAG_GLOBAL_SYMBOLS = (1 << 0), + AST_MODFLAG_BUILDSUM = (1 << 1), }; struct ast_module_info { @@ -233,7 +234,7 @@ AST_MODULE, \ desc, \ keystr, \ - flags_to_set, \ + flags_to_set | AST_MODFLAG_BUILDSUM, \ AST_BUILDOPT_SUM, \ }; \ static void __attribute__ ((constructor)) __reg_module(void) \ @@ -261,7 +262,7 @@ #define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...) \ static struct ast_module_info __mod_info = { \ .name = AST_MODULE, \ - .flags = flags_to_set, \ + .flags = flags_to_set | AST_MODFLAG_BUILDSUM, \ .description = desc, \ .key = keystr, \ .buildopt_sum = AST_BUILDOPT_SUM, \ Index: main/loader.c =================================================================== --- main/loader.c (revision 91033) +++ main/loader.c (working copy) @@ -615,8 +615,10 @@ return 1; } - if (!ast_strlen_zero(mod->info->buildopt_sum) && - strcmp(buildopt_sum, mod->info->buildopt_sum)) { + if (!ast_test_flag(mod->info, AST_MODFLAG_BUILDSUM)) { + ast_log(LOG_WARNING, "Module '%s' was not compiled against a recent version of Asterisk and may cause instability.\n", mod->resource); + } else if (!ast_strlen_zero(mod->info->buildopt_sum) && + strcmp(buildopt_sum, mod->info->buildopt_sum)) { ast_log(LOG_WARNING, "Module '%s' was not compiled with the same compile-time options as this version of Asterisk.\n", mod->resource); ast_log(LOG_WARNING, "Module '%s' will not be initialized as it may cause instability.\n", mod->resource); return 1;