diff --git a/src/core/common/qt_ipc_logging.cpp b/src/core/common/qt_ipc_logging.cpp
index 124124de1b22952d36cd3b99796f465ec8c29517..f2a00b23cd84ef7a6b393dda3422076153b44f99 100644
--- a/src/core/common/qt_ipc_logging.cpp
+++ b/src/core/common/qt_ipc_logging.cpp
@@ -37,9 +37,9 @@
 **
 ****************************************************************************/
 
-#include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED
+#include "ipc/ipc_features.h" // Generated buildflag header
 
-#if defined(IPC_MESSAGE_LOG_ENABLED)
+#if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED)
 #define IPC_MESSAGE_MACROS_LOG_ENABLED
 #include "content/public/common/content_ipc_logging.h"
 #define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \