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.

40 lines
1.1 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. @@ -2627,7 +2627,7 @@ then
  16. SAVE_CPPFLAGS="$CPPFLAGS"
  17. CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
  18. - AC_CHECK_HEADERS(modbus.h, [], [with_libmodbus="no (modbus.h not found)"])
  19. + AC_CHECK_HEADERS(modbus/modbus.h, [], [with_libmodbus="no (modbus/modbus.h not found)"])
  20. CPPFLAGS="$SAVE_CPPFLAGS"
  21. fi
  22. --- a/src/modbus.c
  23. +++ b/src/modbus.c
  24. @@ -26,7 +26,7 @@
  25. #include "configfile.h"
  26. #include "plugin.h"
  27. -#include <modbus.h>
  28. +#include <modbus/modbus.h>
  29. #include <netdb.h>
  30. #include <sys/socket.h>