diff options
author | Remi Collet <remi@remirepo.net> | 2019-03-11 13:39:22 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2019-03-12 08:23:11 +0100 |
commit | 233888e36a6fb510214414a7ddb5fe18637b4182 (patch) | |
tree | 9ff03decb3b9bc1401ff0569169b2b6894c163b8 | |
parent | d633cbac1c1d957ae07994b2e20ea4d86ad8dc3c (diff) | |
download | php-git-233888e36a6fb510214414a7ddb5fe18637b4182.tar.gz |
use DL_LOAD in litespeed
-rw-r--r-- | sapi/litespeed/lsapilib.c | 4 | ||||
-rw-r--r-- | sapi/litespeed/lscriu.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c index a5601afe95..c5ae5aff05 100644 --- a/sapi/litespeed/lsapilib.c +++ b/sapi/litespeed/lsapilib.c @@ -92,6 +92,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define uint32 uint32_t #endif +#include <Zend/zend_portability.h> + struct lsapi_MD5Context { uint32 buf[4]; uint32 bits[2]; @@ -767,7 +769,7 @@ static int (*fp_lve_leave)(struct liblve *, uint32_t *) = NULL; static int (*fp_lve_jail)( struct passwd *, char *) = NULL; static int lsapi_load_lve_lib(void) { - s_liblve = dlopen("liblve.so.0", RTLD_LAZY); + s_liblve = DL_LOAD("liblve.so.0"); if (s_liblve) { fp_lve_is_available = dlsym(s_liblve, "lve_is_available"); diff --git a/sapi/litespeed/lscriu.c b/sapi/litespeed/lscriu.c index 750557f24f..9fa1de22c5 100644 --- a/sapi/litespeed/lscriu.c +++ b/sapi/litespeed/lscriu.c @@ -88,6 +88,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <unistd.h> #include "lscriu.h" +#include <Zend/zend_portability.h> + #define LSCRIU_PATH 256 // Begin CRIU inclusion @@ -262,8 +264,8 @@ static int LSCRIU_load_liblscapi(void) int error = 1; char *last; - if (!(lib_handle = dlopen(last = "liblscapi.so", RTLD_LAZY)) /*|| - !(pthread_lib_handle = dlopen(last = "libpthread.so", RTLD_LAZY))*/) + if (!(lib_handle = DL_LOAD(last = "liblscapi.so")) /*|| + !(pthread_lib_handle = DL_LOAD(last = "libpthread.so"))*/) fprintf(stderr, "LSCRIU (%d): failed to dlopen %s: %s - ignore CRIU\n", s_pid, last, dlerror()); else if (!(s_lscapi_dump_me = dlsym(lib_handle, last = "lscapi_dump_me")) || |