From 6124da7a48f28f54fc09ebeb942d1037516fe6ab Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 1 Aug 2015 11:46:45 +0200 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. --- configure.ac | 2 +- src/modbus.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 8a494da8..e7d5dd58 100644 --- a/configure.ac +++ b/configure.ac @@ -2456,7 +2456,7 @@ then SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags" - AC_CHECK_HEADERS(modbus/modbus.h, [], [with_libmodbus="no (modbus/modbus.h not found)"]) + AC_CHECK_HEADERS(modbus.h, [], [with_libmodbus="no (modbus.h not found)"]) CPPFLAGS="$SAVE_CPPFLAGS" fi diff --git a/src/modbus.c b/src/modbus.c index df169825..aa69ee10 100644 --- a/src/modbus.c +++ b/src/modbus.c @@ -27,7 +27,7 @@ #include -#include +#include #ifndef LIBMODBUS_VERSION_CHECK /* Assume version 2.0.3 */ -- 2.11.0