diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2018-06-24 16:25:36 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2018-06-24 16:25:36 +0300 |
commit | 4eb6c170f9ee4ec2aaa536324ae7b465fd1bf698 (patch) | |
tree | 6226aa7ef632c84cad4a52ea099770be636b5e04 | |
parent | 3a29aab877dce4276e2ca427f36c9fcc1c450c99 (diff) | |
download | nixsap-4eb6c170f9ee4ec2aaa536324ae7b465fd1bf698.tar.gz |
monitoringPlugins: apply the patch for MariaDB >= 10.2
-rw-r--r-- | modules/pkgs/monitoringPlugins/check_mysql_MYSQL_PORT.patch | 26 | ||||
-rw-r--r-- | modules/pkgs/monitoringPlugins/default.nix | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/modules/pkgs/monitoringPlugins/check_mysql_MYSQL_PORT.patch b/modules/pkgs/monitoringPlugins/check_mysql_MYSQL_PORT.patch new file mode 100644 index 0000000..5284ec8 --- /dev/null +++ b/modules/pkgs/monitoringPlugins/check_mysql_MYSQL_PORT.patch @@ -0,0 +1,26 @@ +From 399cc141526ee77e1befce469f1fab40645f299d Mon Sep 17 00:00:00 2001 +From: Bernard Spil <Sp1l@users.noreply.github.com> +Date: Mon, 6 Nov 2017 17:31:44 +0100 +Subject: [PATCH] Fix build issue with MariaDB 10.2 + +As of 10.2 MariaDB no longer defines MYSQL_PORT. +--- + plugins/common.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/plugins/common.h b/plugins/common.h +index 8719b502..6bf4fca4 100644 +--- a/plugins/common.h ++++ b/plugins/common.h +@@ -174,6 +174,11 @@ + * + */ + ++/* MariaDB 10.2 client does not set MYSQL_PORT */ ++#ifndef MYSQL_PORT ++# define MYSQL_PORT 3306 ++#endif ++ + enum { + OK = 0, + ERROR = -1 diff --git a/modules/pkgs/monitoringPlugins/default.nix b/modules/pkgs/monitoringPlugins/default.nix index 16240dc..1750757 100644 --- a/modules/pkgs/monitoringPlugins/default.nix +++ b/modules/pkgs/monitoringPlugins/default.nix @@ -18,6 +18,7 @@ stdenv.mkDerivation rec { patches = [ ./mysql_check_slave.patch ./test-str-format.patch + ./check_mysql_MYSQL_PORT.patch ]; configurePhase = '' |