summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2017-10-10 21:39:54 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2017-10-10 21:39:54 +0100
commita12400fd4493b676e71613ab429e731f777ebd1e (patch)
tree9b453c72e0290dda5eb3f4fe04fa800a4f5e9a23
parent8de0078cd20620e18cd32b5de9d21b94810cea31 (diff)
MySQL: fix build on Fedora 27, where MariaDB version information has become unavailable
-rw-r--r--src/src/lookups/mysql.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/src/lookups/mysql.c b/src/src/lookups/mysql.c
index ddc7dc841..40b27d5ba 100644
--- a/src/src/lookups/mysql.c
+++ b/src/src/lookups/mysql.c
@@ -433,10 +433,15 @@ return quoted;
void
mysql_version_report(FILE *f)
{
-fprintf(f, "Library version: MySQL: Compile: %s [%s]\n"
- " Runtime: %s\n",
- MYSQL_SERVER_VERSION, MYSQL_COMPILATION_COMMENT,
- mysql_get_client_info());
+#ifdef MYSQL_SERVER_VERSION
+fprintf(f, "Library version: MySQL: Compile: %s [%s]\n",
+ MYSQL_SERVER_VERSION, MYSQL_COMPILATION_COMMENT);
+#else
+fprintf(f, "Library version: MySQL: Compile: (unknown)\n");
+#endif
+
+fprintf(f, " Runtime: %s\n", mysql_get_client_info());
+
#ifdef DYNLOOKUP
fprintf(f, " Exim version %s\n", EXIM_VERSION_STR);
#endif