lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

600-fix-libmodbus-detection.patch (1153B)


      1 Patch reverts upstream commit:
      2 https://github.com/collectd/collectd/commit/6124da7a48f28f54fc09ebeb942d1037516fe6ab
      3 
      4 The commit changed the detection path due to FreeBSD issues,
      5 but apparently affects also Openwrt buildroot negatively.
      6 
      7 Original explanation:
      8   From 6124da7a48f28f54fc09ebeb942d1037516fe6ab Mon Sep 17 00:00:00 2001
      9   Subject: [PATCH] Fix libmodbus detection on FreeBSD
     10 
     11   We look for modbus/modbus.h in /usr/local/include/modbus
     12   but we should look for modbus.h
     13 
     14   This is only an issue on FreeBSD since /usr/local/include is not
     15   in the default search path.
     16 
     17 Reversed patch to be applied:
     18 
     19 --- a/configure.ac
     20 +++ b/configure.ac
     21 @@ -3186,7 +3186,7 @@ then
     22  	SAVE_CPPFLAGS="$CPPFLAGS"
     23  	CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
     24  
     25 -	AC_CHECK_HEADERS(modbus.h, [], [with_libmodbus="no (modbus.h not found)"])
     26 +	AC_CHECK_HEADERS(modbus/modbus.h, [], [with_libmodbus="no (modbus/modbus.h not found)"])
     27  
     28  	CPPFLAGS="$SAVE_CPPFLAGS"
     29  fi
     30 --- a/src/modbus.c
     31 +++ b/src/modbus.c
     32 @@ -26,7 +26,7 @@
     33  #include "configfile.h"
     34  #include "plugin.h"
     35  
     36 -#include <modbus.h>
     37 +#include <modbus/modbus.h>
     38  #include <netdb.h>
     39  #include <sys/socket.h>
     40