]> git.ipfire.org Git - thirdparty/asterisk.git/commit
loader: Add volatile to resource_being_loaded.
authorCorey Farrell <git@cfware.com>
Sun, 24 Dec 2017 04:51:13 +0000 (23:51 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 28 Dec 2017 02:14:19 +0000 (20:14 -0600)
commite302e075672622642fa9547b95be3a23c1924a59
treee7a48de6405860271a0805f1cc7a24bdbb36e704
parenta474f24b421b4518ffa39820b6a1da7ec31cedf5
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
(cherry picked from commit 92fb393cab7fbd164e299601e94909ba95a0116b)
main/loader.c