You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB

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