package/php: set MySQL socket path
authorFloris Bos <bos@je-eigen-domein.nl>
Tue, 13 Sep 2016 22:03:51 +0000 (00:03 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 18 Sep 2016 17:36:04 +0000 (19:36 +0200)
Set the PHP default MySQL socket path to match what the
mysql package is using.

Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/php/php.mk

index 083b451d64dcd633c6123b8e31fe05914aa90265..b1b19ada7c9fbe3f46120df9eb3e6d8ace9f51ba 100644 (file)
@@ -211,6 +211,11 @@ PHP_DEPENDENCIES += unixodbc
 endif
 endif
 
+ifneq ($(BR2_PACKAGE_PHP_EXT_MYSQLI)$(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),)
+# Set default MySQL unix socket to what the MySQL server is using by default
+PHP_CONF_OPTS += --with-mysql-sock=$(MYSQL_SOCKET)
+endif
+
 define PHP_DISABLE_PCRE_JIT
        $(SED) '/^#define SUPPORT_JIT/d' $(@D)/ext/pcre/pcrelib/config.h
 endef