Hi,
we updated the referenced upstream bug with the following patch which
seems to work for now until upstream picked something up.
Description: configure: barometer: fix i2c lib usage for 4.0

The newer libi2c separated some symbols.
Thanks ahasenack for the patch.

Forwarded: yes (ML entry)/no(reason) if created new, otherwise line not needed
Author: Andreas Hasenack <andreas.hasen...@canonical.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1742691
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=886920
Last-Update: 2018-01-14

--- a/configure.ac
+++ b/configure.ac
@@ -6216,7 +6216,7 @@ AC_CHECK_DECL(i2c_smbus_read_i2c_block_d
 	[with_libi2c="yes"],
 	[with_libi2c="no (symbol i2c_smbus_read_i2c_block_data not found - have you installed libi2c-dev ?)"],
 	[[#include <stdlib.h>
-	#include <linux/i2c-dev.h>]])
+	#include <i2c/smbus.h>]])
 else
 	with_libi2c="no (Linux only)"
 fi
--- a/src/barometer.c
+++ b/src/barometer.c
@@ -27,6 +27,7 @@
 
 #include <fcntl.h>
 #include <linux/i2c-dev.h>
+#include <i2c/smbus.h>
 #include <math.h>
 #include <stdint.h>
 #include <sys/ioctl.h>
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -232,7 +232,7 @@ if BUILD_PLUGIN_BAROMETER
 pkglib_LTLIBRARIES += barometer.la
 barometer_la_SOURCES = barometer.c
 barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS)
-barometer_la_LIBADD = -lm
+barometer_la_LIBADD = -lm -li2c
 endif
 
 if BUILD_PLUGIN_BATTERY

Reply via email to