forked from pool/collectd
Accepting request 661966 from home:mnhauke:monitoring
- Add patch: * 0001-gps-plugin-fix-build-with-newer-gpsd.patch OBS-URL: https://build.opensuse.org/request/show/661966 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/collectd?expand=0&rev=152
This commit is contained in:
parent
892240d373
commit
7cc84ff94d
41
0001-gps-plugin-fix-build-with-newer-gpsd.patch
Normal file
41
0001-gps-plugin-fix-build-with-newer-gpsd.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From d5ec9075510601537cc76be4417ab337364506d0 Mon Sep 17 00:00:00 2001
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
Date: Tue, 9 Oct 2018 19:57:21 +0300
|
||||
Subject: [PATCH] gps plugin: fix build with newer gpsd
|
||||
|
||||
gpsd version 3.18 changed the prototype of gps_read(). Make the
|
||||
gps_read() call depend on GPSD_API_MAJOR_VERSION to fix that.
|
||||
|
||||
This fixes build failures like:
|
||||
|
||||
gps.c: In function 'cgps_thread':
|
||||
gps.c:144:11: error: too few arguments to function 'gps_read'
|
||||
if (gps_read(&gpsd_conn) == -1) {
|
||||
^~~~~~~~
|
||||
|
||||
(cherry picked from commit 991a6d3fd38c2435d94de3853fda36b3330cf6ab)
|
||||
---
|
||||
src/gps.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/gps.c b/src/gps.c
|
||||
index 1d32d049..b22c3a2e 100644
|
||||
--- a/src/gps.c
|
||||
+++ b/src/gps.c
|
||||
@@ -141,7 +141,12 @@ static void *cgps_thread(void *pData) {
|
||||
continue;
|
||||
}
|
||||
|
||||
- if (gps_read(&gpsd_conn) == -1) {
|
||||
+#if GPSD_API_MAJOR_VERSION > 6
|
||||
+ if (gps_read(&gpsd_conn, NULL, 0) == -1)
|
||||
+#else
|
||||
+ if (gps_read(&gpsd_conn) == -1)
|
||||
+#endif
|
||||
+ {
|
||||
WARNING("gps plugin: incorrect data! (err_count: %d)", err_count);
|
||||
err_count++;
|
||||
|
||||
--
|
||||
2.16.4
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 29 14:59:06 UTC 2018 - mardnh@gmx.de
|
||||
|
||||
- Add patch:
|
||||
* 0001-gps-plugin-fix-build-with-newer-gpsd.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 7 12:24:38 UTC 2018 - mardnh@gmx.de
|
||||
|
||||
|
@ -64,6 +64,7 @@ Patch20: collectd-split_README.patch
|
||||
Patch21: collectd-fix_collectd_config_path_in_snmp_probe.patch
|
||||
Patch23: collectd-javac_target.patch
|
||||
Patch24: 9e36cd85a2bb_sigrok_Update_to_support_libsigrok_0_4.patch
|
||||
Patch25: 0001-gps-plugin-fix-build-with-newer-gpsd.patch
|
||||
# for /etc/apache2/... ownership (rpmlint):
|
||||
BuildRequires: apache2
|
||||
BuildRequires: autoconf
|
||||
@ -419,6 +420,7 @@ to write %{name} unixsock clients.
|
||||
%if 0%{?suse_version} > 1320
|
||||
%patch24 -p1
|
||||
%endif
|
||||
%patch25 -p1
|
||||
|
||||
sed -i 's|@@VERSION@@|%{version}|g' configure.ac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user