Skip to content
Snippets Groups Projects
Commit 23aa20bf authored by Corey Farrell's avatar Corey Farrell
Browse files

loader: Add volatile to resource_being_loaded.

Some compiler optimizers seem to assume that dlopen will not use
__attribute__((constructor)) functions to call back to the program.
This was causing resource_being_loaded to be optimized away completely.

ASTERISK-27531 #close
Tested By: abelbeck

Change-Id: If17a3b889e06811a0e7119f0539d052494d6ece9
parent 55330654
No related branches found
No related tags found
No related merge requests found
......@@ -198,7 +198,7 @@ static AST_DLLIST_HEAD_STATIC(reload_queue, reload_queue_item);
*
* This is protected by the module_list lock.
*/
static struct ast_module *resource_being_loaded;
static struct ast_module * volatile resource_being_loaded;
/*!
* \internal
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment