File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 164164
165165# if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT)
166166# define DL_LOAD (libname ) dlopen(libname, PHP_RTLD_MODE | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
167- # elif defined(RTLD_DEEPBIND) && !defined(__SANITIZE_ADDRESS__) && !__has_feature(memory_sanitizer)
167+ # elif defined(RTLD_DEEPBIND) && !defined(__SANITIZE_ADDRESS__) && !__has_feature(memory_sanitizer) && defined(PHP_USE_RTLD_DEEPBIND)
168168# define DL_LOAD (libname ) dlopen(libname, PHP_RTLD_MODE | RTLD_GLOBAL | RTLD_DEEPBIND)
169169# else
170170# define DL_LOAD (libname ) dlopen(libname, PHP_RTLD_MODE | RTLD_GLOBAL)
Original file line number Diff line number Diff line change @@ -922,6 +922,23 @@ if test "$PHP_RTLD_NOW" = "yes"; then
922922 AC_DEFINE ( PHP_USE_RTLD_NOW , 1 , [ Use dlopen with RTLD_NOW instead of RTLD_LAZY ] )
923923fi
924924
925+ if test "$PHP_SAPI" = "apache2handler"; then
926+ PHP_RTLD_DEEPBIND_DEFAULT=yes
927+ else
928+ PHP_RTLD_DEEPBIND_DEFAULT=no
929+ fi
930+
931+ PHP_ARG_ENABLE([ rtld-deepbind] ,
932+ [ whether to dlopen extensions with RTLD_DEEPBIND] ,
933+ [ AS_HELP_STRING ( [ --enable-rtld-deepbind] ,
934+ [ Use dlopen with RTLD_DEEPBIND] ) ] ,
935+ [ $PHP_RTLD_DEEPBIND_DEFAULT] ,
936+ [ $PHP_RTLD_DEEPBIND_DEFAULT] )
937+
938+ if test "$PHP_RTLD_DEEPBIND" = "yes"; then
939+ AC_DEFINE ( PHP_USE_RTLD_DEEPBIND , 1 , [ Use dlopen with RTLD_DEEPBIND ] )
940+ fi
941+
925942PHP_ARG_WITH([ layout] ,
926943 [ layout of installed files] ,
927944 [ AS_HELP_STRING ( [ --with-layout=TYPE] ,
You can’t perform that action at this time.
0 commit comments