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 29, 2021
1 parent 2bc7329 commit f588e6b
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 f588e6b

Please sign in to comment.