From 12eadfdfd9e6603fd5aa8e8e8887540324a4d56d Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Thu, 17 Oct 2024 09:37:55 -0700 Subject: [PATCH] Handle `PROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII` being undefined Check if `defined(PROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII)` before trying to use it. PiperOrigin-RevId: 686945589 --- src/google/protobuf/port_def.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index 56f995e45e..3feef35b77 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -904,7 +904,8 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), #pragma warning(disable: 4125) #endif -#if PROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII +#if defined(PROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII) && \ + PROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII #define PROTOBUF_DEBUG true #else #define PROTOBUF_DEBUG false