Skip to content

Commit

Permalink
Fix missing port_undef
Browse files Browse the repository at this point in the history
unparser.cc, arenaz_sampler_test.cc, and message_module.cc included
port_def.inc but forgot to include the undef file.  This can cause
some issues on which absl macros are defined:

In file included from
/opt/protobuf-29/include/google/protobuf/arena.h:36:
In file included from
/opt/protobuf-29/include/google/protobuf/arena_align.h:63:
/opt/protobuf-29/include/google/protobuf/port_def.inc:542:5: error:
function-like macro 'ABSL_HAVE_FEATURE' is not defined
\#if ABSL_HAVE_FEATURE(address_sanitizer)
  • Loading branch information
wilstoff committed Jan 30, 2025
1 parent 7d02d01 commit 7ae2cac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/google/protobuf/pyext/message_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -347,3 +347,5 @@ PyMODINIT_FUNC PyInit__message() {

return m;
}

#include "google/protobuf/port_undef.inc"
2 changes: 2 additions & 0 deletions src/google/protobuf/arenaz_sampler_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -598,3 +598,5 @@ TEST(ThreadSafeArenazSamplerTest, UsedAndWasted) {
} // namespace internal
} // namespace protobuf
} // namespace google

#include "google/protobuf/port_undef.inc"
2 changes: 2 additions & 0 deletions src/google/protobuf/json/internal/unparser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -905,3 +905,5 @@ absl::Status BinaryToJsonStream(google::protobuf::util::TypeResolver* resolver,
} // namespace json_internal
} // namespace protobuf
} // namespace google

#include "google/protobuf/port_undef.inc"

0 comments on commit 7ae2cac

Please sign in to comment.