loader: Add volatile to resource_being_loaded.
authorCorey Farrell <git@cfware.com>
Sun, 24 Dec 2017 04:51:13 +0000 (23:51 -0500)
committerCorey Farrell <git@cfware.com>
Sun, 24 Dec 2017 05:44:12 +0000 (23:44 -0600)
commit23aa20bf209dbc02b01c757c5f5f1a787548ed96
tree5150fe12fe2b7c95fd27c252abeaeee5d30efafc
parent553306548ca4b1733b4555575775b91d55db1a99
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
main/loader.c