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.

45 lines
1.4 KiB

  1. From d311970864a2338d63ce3c22a46bb9ec4bb26bfe Mon Sep 17 00:00:00 2001
  2. From: Peter Newman <peterjnewman@gmail.com>
  3. Date: Fri, 8 Mar 2019 15:43:50 +0000
  4. Subject: [PATCH] Attempt to fix Protobuf 3.7 builds
  5. ---
  6. configure.ac | 3 +++
  7. protoc/StrUtil.cpp | 10 ++++++++++
  8. 2 files changed, 13 insertions(+)
  9. diff --git a/configure.ac b/configure.ac
  10. index 9824609b4..4f782847c 100644
  11. --- a/configure.ac
  12. +++ b/configure.ac
  13. @@ -803,6 +803,9 @@ AS_IF([test "${enable_rdm_tests}" = "yes"],
  14. AS_IF([test "x$build_java_libs" = xyes],
  15. [PROTOBUF_SUPPORT([2.4.0])],
  16. [PROTOBUF_SUPPORT([2.3.0])])
  17. +# Version 3.7 and above of protoc require some additional includes
  18. +AC_CHECK_HEADERS([google/protobuf/io/strtod.h google/protobuf/stubs/logging.h \
  19. + google/protobuf/stubs/stl_util.h])
  20. # Doxygen
  21. diff --git a/protoc/StrUtil.cpp b/protoc/StrUtil.cpp
  22. index 85891a6a4..2914e82f1 100644
  23. --- a/protoc/StrUtil.cpp
  24. +++ b/protoc/StrUtil.cpp
  25. @@ -41,6 +41,16 @@
  26. #include "protoc/StrUtil.h"
  27. +#ifdef HAVE_GOOGLE_PROTOBUF_IO_STRTOD_H
  28. +#include <google/protobuf/io/strtod.h>
  29. +#endif // HAVE_GOOGLE_PROTOBUF_IO_STRTOD_H
  30. +#ifdef HAVE_GOOGLE_PROTOBUF_STUBS_LOGGING_H
  31. +#include <google/protobuf/stubs/logging.h>
  32. +#endif // HAVE_GOOGLE_PROTOBUF_STUBS_LOGGING_H
  33. +#ifdef HAVE_GOOGLE_PROTOBUF_STUBS_STL_UTIL_H
  34. +#include <google/protobuf/stubs/stl_util.h>
  35. +#endif // HAVE_GOOGLE_PROTOBUF_STUBS_STL_UTIL_H
  36. +
  37. #ifdef _WIN32
  38. // MSVC has only _snprintf, not snprintf.
  39. //