packages/utils/collectd/patches/600-fix-libmodbus-detection.patch
Hannu Nyman 11d3b98950 collectd: Update to 5.5.1
Update collectd, the backbone of Luci statistics, to 5.5.1

Refresh patches. Main changes:
 - Remove 500-upstream-parallel-build-fix.patch (implemented upstream)
 - Add 600-fix-libmodbus-detection.patch to revert an upstream change
   that broke libmodbus detection in collectd's configure script

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2016-02-03 18:59:37 +02:00

40 lines
1.1 KiB
Diff

Patch reverts upstream commit:
https://github.com/collectd/collectd/commit/6124da7a48f28f54fc09ebeb942d1037516fe6ab
The commit changed the detection path due to FreeBSD issues,
but apparently affects also Openwrt buildroot negatively.
Original explanation:
From 6124da7a48f28f54fc09ebeb942d1037516fe6ab Mon Sep 17 00:00:00 2001
Subject: [PATCH] Fix libmodbus detection on FreeBSD
We look for modbus/modbus.h in /usr/local/include/modbus
but we should look for modbus.h
This is only an issue on FreeBSD since /usr/local/include is not
in the default search path.
Reversed patch to be applied:
--- a/configure.ac
+++ b/configure.ac
@@ -2585,7 +2585,7 @@ then
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
- AC_CHECK_HEADERS(modbus.h, [], [with_libmodbus="no (modbus.h not found)"])
+ AC_CHECK_HEADERS(modbus/modbus.h, [], [with_libmodbus="no (modbus/modbus.h not found)"])
CPPFLAGS="$SAVE_CPPFLAGS"
fi
--- a/src/modbus.c
+++ b/src/modbus.c
@@ -27,7 +27,7 @@
#include <netdb.h>
-#include <modbus.h>
+#include <modbus/modbus.h>
#ifndef LIBMODBUS_VERSION_CHECK
/* Assume version 2.0.3 */