1 From b7bbdfbcb0869b5c068143d4e27bab9eac4ae72b Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
3 Date: Mon, 26 Feb 2018 19:30:55 +0100
4 Subject: [PATCH] main/php_ini.c: build empty php_load_zend_extension_cb() when
7 Commit 0782a7fc6314c8bd3cbfd57f12d0479bf9cc8dc7 ("Fixed bug #74866
8 extension_dir = "./ext" now use current directory for base") modified
9 the php_load_zend_extension_cb() function to use php_load_shlib(), and
10 pass a handle to the newly introduced zend_load_extension_handle()
11 function instead of passing the extension path to
12 zend_load_extension().
14 While doing so, it introduced a call to php_load_shlib() from code
15 that is built even when HAVE_LIBDL is not defined. However,
16 php_load_shlib() is not implemented when HAVE_LIBDL is not defined,
19 It turns out that zend_load_extension_handle() anyway doesn't do
20 anything when ZEND_EXTENSIONS_SUPPORT is defined to 0, and
21 ZEND_EXTENSIONS_SUPPORT is not defined when HAVE_LIBDL is not defined
22 (Zend/zend_portability.h).
24 Fixes the following build failure when building on a system that
27 main/php_ini.o: In function `php_load_zend_extension_cb':
28 php_ini.c:(.text+0x478): undefined reference to `php_load_shlib'
29 php_ini.c:(.text+0x4b0): undefined reference to `php_load_shlib'
30 collect2: error: ld returned 1 exit status
32 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
33 Upstream-status: https://github.com/php/php-src/pull/3161
35 main/php_ini.c | 4 ++++
36 1 file changed, 4 insertions(+)
38 diff --git a/main/php_ini.c b/main/php_ini.c
39 index ba58eb1180..fca263e5f0 100644
42 @@ -350,6 +350,7 @@ static void php_load_php_extension_cb(void *arg)
44 /* {{{ php_load_zend_extension_cb
47 static void php_load_zend_extension_cb(void *arg)
49 char *filename = *((char **) arg);
50 @@ -409,6 +410,9 @@ static void php_load_zend_extension_cb(void *arg)
55 +static void php_load_zend_extension_cb(void *arg) { }
59 /* {{{ php_init_config