summaryrefslogtreecommitdiff
path: root/main/loader.c
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2017-12-23 23:51:13 -0500
committerCorey Farrell <git@cfware.com>2017-12-23 23:44:12 -0600
commit23aa20bf209dbc02b01c757c5f5f1a787548ed96 (patch)
tree5150fe12fe2b7c95fd27c252abeaeee5d30efafc /main/loader.c
parent553306548ca4b1733b4555575775b91d55db1a99 (diff)
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
Diffstat (limited to 'main/loader.c')
-rw-r--r--main/loader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/loader.c b/main/loader.c
index 8f65fb3c8..fe18048ef 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -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