diff options
author | Corey Farrell <git@cfware.com> | 2017-12-23 23:51:13 -0500 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2017-12-24 00:34:58 -0500 |
commit | 92fb393cab7fbd164e299601e94909ba95a0116b (patch) | |
tree | 238199dcd761d3c81da9d91e46dc7cf06a489837 | |
parent | 53799318bc040a2082904df86d42ab08790b47ec (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
-rw-r--r-- | main/loader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/loader.c b/main/loader.c index c18fb379f..b9baf3e93 100644 --- a/main/loader.c +++ b/main/loader.c @@ -202,7 +202,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 |