[packages/mk-livestatus] Rel 2

arekm arekm at pld-linux.org
Fri May 8 21:59:36 CEST 2026


commit 223260d210cb199fa6e5fff73a8e9d2297ac1964
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri May 8 21:59:26 2026 +0200

    Rel 2

 logcache-pthread.patch | 31 +++++++++++++++++++++++++++++++
 mk-livestatus.spec     |  4 +++-
 2 files changed, 34 insertions(+), 1 deletion(-)
---
diff --git a/mk-livestatus.spec b/mk-livestatus.spec
index 51fbc81..ece2225 100644
--- a/mk-livestatus.spec
+++ b/mk-livestatus.spec
@@ -1,13 +1,14 @@
 Summary:	Accessing Nagios status data
 Name:		mk-livestatus
 Version:	1.2.6p9
-Release:	1
+Release:	2
 License:	GPL v2
 Group:		Applications
 # Source0Download: https://mathias-kettner.de/check_mk_download_source.html
 Source0:	https://mathias-kettner.de/download/%{name}-%{version}.tar.gz
 # Source0-md5:	a01b3cc372f5dbe672eee29afeb94dd5
 Patch0:		socket-path.patch
+Patch1:		logcache-pthread.patch
 URL:		http://mathias-kettner.de/checkmk_livestatus.html
 BuildRequires:	rpmbuild(macros) >= 1.268
 Requires:	nagios >= 4.0
@@ -31,6 +32,7 @@ able retrieve historic data from the Nagios log files via Livestatus.
 %prep
 %setup -q
 %patch -P0 -p1
+%patch -P1 -p1
 
 %build
 %configure \
diff --git a/logcache-pthread.patch b/logcache-pthread.patch
new file mode 100644
index 0000000..fb15ad2
--- /dev/null
+++ b/logcache-pthread.patch
@@ -0,0 +1,31 @@
+Fix missing #include <pthread.h> and duplicate symbol with GCC 15 / -fno-common.
+
+1. LogCache.cc: GCC 15 / glibc no longer provides pthread types transitively
+   through other headers.  Add explicit #include <pthread.h>.
+
+2. logger.c: With -fno-common (default since GCC 10), having a tentative
+   definition of g_mainthread_id in both logger.c and module.c causes a
+   multiple-definition link error.  logger.c only uses the variable; the
+   definition lives in module.c.  Change logger.c to an extern declaration.
+
+--- mk-livestatus-1.2.6p9/src/LogCache.cc~	2015-06-24 12:48:37.000000000 +0200
++++ mk-livestatus-1.2.6p9/src/LogCache.cc	2026-05-08 00:00:00.000000000 +0200
+@@ -30,6 +30,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <time.h>
++#include <pthread.h>
+ #include <unistd.h>
+
+ #include "nagios.h"
+--- mk-livestatus-1.2.6p9/src/logger.c~	2015-06-24 12:48:37.000000000 +0200
++++ mk-livestatus-1.2.6p9/src/logger.c	2026-05-08 00:00:00.000000000 +0200
+@@ -31,7 +31,7 @@
+ #include <pthread.h>
+
+ extern char g_logfile_path[];
+-pthread_t g_mainthread_id;
++extern pthread_t g_mainthread_id;
+ FILE *g_logfile = 0;
+
+ void open_logfile()
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mk-livestatus.git/commitdiff/223260d210cb199fa6e5fff73a8e9d2297ac1964



More information about the pld-cvs-commit mailing list