From 3287998d1e9882658777a0e6be13b405a918f7d3 Mon Sep 17 00:00:00 2001 From: Andreas Hasenack Date: Sat, 6 Apr 2019 13:21:09 +0100 Subject: [PATCH] configure: barometer: fix i2c lib usage for 4.0 Forwarded: https://github.com/collectd/collectd/issues/2646 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1742691 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=886920 Last-Update: 2018-02-21 Gbp-Pq: Name i2c_detection.patch --- Makefile.am | 2 +- configure.ac | 2 +- src/barometer.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2ef2442..5b48735 100644 --- a/Makefile.am +++ b/Makefile.am @@ -599,7 +599,7 @@ if BUILD_PLUGIN_BAROMETER pkglib_LTLIBRARIES += barometer.la barometer_la_SOURCES = src/barometer.c barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS) -barometer_la_LIBADD = -lm +barometer_la_LIBADD = -lm -li2c endif if BUILD_PLUGIN_BATTERY diff --git a/configure.ac b/configure.ac index f39096e..9ddb1c7 100644 --- a/configure.ac +++ b/configure.ac @@ -1883,7 +1883,7 @@ if test "x$ac_system" = "xLinux"; then [with_libi2c="no (symbol i2c_smbus_read_i2c_block_data not found - have you installed libi2c-dev ?)"], [[ #include - #include + #include ]] ) else diff --git a/src/barometer.c b/src/barometer.c index f698005..e3d418d 100644 --- a/src/barometer.c +++ b/src/barometer.c @@ -27,6 +27,7 @@ #include #include +#include #include #include #include -- 2.30.2