Skip to content

Commit

Permalink
Using legacy LIBPROTOBUF_EXPORT with old version of protobuf
Browse files Browse the repository at this point in the history
Support old protobuf for OtlpHttp*Exporter

Signed-off-by: owentou <owentou@tencent.com>
  • Loading branch information
owent committed Oct 26, 2021
1 parent 9b13bc7 commit 609ab83
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion exporters/otlp/src/otlp_http_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,20 @@

#include "google/protobuf/message.h"
#include "google/protobuf/reflection.h"
#include "google/protobuf/stubs/strutil.h"
#include "google/protobuf/stubs/common.h"

#if defined(GOOGLE_PROTOBUF_VERSION) && GOOGLE_PROTOBUF_VERSION >= 3007000
# include "google/protobuf/stubs/strutil.h"
#else
# include "google/protobuf/stubs/port.h"
namespace google
{
namespace protobuf
{
LIBPROTOBUF_EXPORT int Base64Escape(const unsigned char *src, int slen, char *dest, int szdest);
} // namespace protobuf
} // namespace google
#endif

#include "opentelemetry/exporters/otlp/protobuf_include_suffix.h"

Expand Down

0 comments on commit 609ab83

Please sign in to comment.