summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mysql/php_mysql.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 6ccbbc494f..9d4bc2ab80 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -55,14 +55,16 @@ static int le_result, le_link, le_plink;
#include "php_ini.h"
-# if HAVE_MYSQL_MYSQL_H
-# include <mysql/mysql.h>
-# else
-# include <mysql.h>
-# endif
+#if HAVE_MYSQL_MYSQL_H
+# include <mysql/mysql.h>
+#else
+# include <mysql.h>
+#endif
-#ifdef HAVE_ERRMSG_H
-#include <errmsg.h>
+#ifdef HAVE_MYSQL_REAL_CONNECT
+# ifdef HAVE_ERRMSG_H
+# include <errmsg.h>
+# endif
#endif
#define SAFE_STRING(s) ((s)?(s):"")