[Pkg-nagios-devel] Bug#919375: Bug#919375: monitoring-plugins: FTBFS with mariadb-10.3: check_mysql.c:61:24: error: 'MYSQL_PORT' undeclared

Jan Wagner waja at cyconet.org
Thu Jan 17 10:35:51 GMT 2019

Hi there,

Am 15.01.19 um 12:17 schrieb Andreas Beckmann:
> i686-linux-gnu-gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I..  -I.. -I../lib -I../gl -I../intl -I/usr/include/ldap -I/usr/include/postgresql -I/usr/include -I/usr/include/mariadb -I/usr/include/ma
> riadb/mysql -Wdate-time -D_FORTIFY_SOURCE=2 -DNP_VERSION='"2.2"' -I/usr/include/mariadb -I/usr/include/mariadb/mysql -g -O2 -fdebug-prefix-map=/build/monitoring-plugins-2.2=. -fstack-protector-strong -Wformat -We
> rror=format-security -Wall -Wl,-z,now -MT check_mysql-check_mysql.o -MD -MP -MF .deps/check_mysql-check_mysql.Tpo -c -o check_mysql-check_mysql.o `test -f 'check_mysql.c' || echo './'`check_mysql.c
> check_mysql.c:61:24: error: 'MYSQL_PORT' undeclared here (not in a function); did you mean 'MYSQL_STMT'?
>  unsigned int db_port = MYSQL_PORT;
>                         ^~~~~~~~~~
>                         MYSQL_STMT
> make[3]: *** [Makefile:1869: check_mysql-check_mysql.o] Error 1

Upstream fixed the issue in
https://github.com/monitoring-plugins/monitoring-plugins/pull/1522 which
is a way different then the one that is committed to our packaging.

Cheers, Jan.
Never write mail to <waja at spamfalle.info>, you have been warned!
Version: 3.12
GIT d-- s+: a C+++ UL++++ P+ L+++ E--- W+++ N+++ o++ K++ w--- O M+ V- PS
PE Y++
PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h---- r+++ y++++
-------------- next part --------------
From 399cc141526ee77e1befce469f1fab40645f299d Mon Sep 17 00:00:00 2001
From: Bernard Spil <Sp1l at 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
 enum {
 	OK = 0,
 	ERROR = -1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-devel/attachments/20190117/70d09765/attachment.sig>

More information about the Pkg-nagios-devel mailing list