Skip to content

Commit

Permalink
always_print_primitive_fields only if GOOGLE_PROTOBUF_VERSION < 50260…
Browse files Browse the repository at this point in the history
…00 ref #566
  • Loading branch information
drbeco authored and rizsotto committed Apr 27, 2024
1 parent dceb534 commit 3ba056a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/intercept/source/collect/db/EventsDatabaseWriter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include "libsys/Errors.h"

#include <google/protobuf/util/json_util.h>
#include <google/protobuf/stubs/common.h>

#include <fmt/format.h>

#include <sys/types.h>
Expand All @@ -36,7 +38,9 @@ namespace {
JsonPrintOptions create_print_options() {
JsonPrintOptions print_options;
print_options.add_whitespace = false;
print_options.always_print_primitive_fields = true;
#if GOOGLE_PROTOBUF_VERSION < 5026000
print_options.always_print_primitive_fields = true;
#endif
print_options.preserve_proto_field_names = true;
print_options.always_print_enums_as_ints = false;
return print_options;
Expand Down

0 comments on commit 3ba056a

Please sign in to comment.